Пример #1
0
 public void CreateWithCurrentCulture()
 {
     using (CultureSaver.SetCultures(Cultures.DotTimeSeparator))
     {
         var pattern = LocalTimePattern.CreateWithCurrentCulture("HH:mm");
         var text    = pattern.Format(new LocalTime(13, 45));
         Assert.AreEqual("13.45", text);
     }
 }
Пример #2
0
        private LocalTime Get(string configText)
        {
            var parser = LocalTimePattern.CreateWithCurrentCulture("HH:mm").Parse(configText);

            return(parser.GetValueOrThrow());
        }