Example #1
0
 internal static DyObject Parse(ExecutionContext ctx, string input, string format)
 {
     try
     {
         return(DyLocalDateTime.Parse(ctx.Type <DyLocalDateTimeTypeInfo>(), format, input));
     }
     catch (FormatException)
     {
         return(ctx.ParsingFailed());
     }
     catch (OverflowException)
     {
         return(ctx.Overflow());
     }
 }
Example #2
0
 internal static DyObject Offset(DyLocalDateTime self) => self.Offset;
Example #3
0
 internal static int Tick(DyLocalDateTime self) => self.Ticks;
Example #4
0
 internal static long TotalTicks(DyLocalDateTime self) => self.TotalTicks;
Example #5
0
 internal static int Second(DyLocalDateTime self) => self.Seconds;
Example #6
0
 internal static int Millisecond(DyLocalDateTime self) => self.Milliseconds;
Example #7
0
 internal static int Hour(DyLocalDateTime self) => self.Hours;
Example #8
0
 internal static int Minute(DyLocalDateTime self) => self.Minutes;
Example #9
0
 internal static int DayOfYear(DyLocalDateTime self) => self.DayOfYear;
Example #10
0
 internal static string DayOfWeek(DyLocalDateTime self) => self.DayOfWeek;
Example #11
0
 internal static int Day(DyLocalDateTime self) => self.Day;
Example #12
0
 internal static int Month(DyLocalDateTime self) => self.Month;
Example #13
0
 internal static int Year(DyLocalDateTime self) => self.Year;