예제 #1
0
 public static DateTimeImmutable?createFromFormat(Context ctx, string format, string?time, DateTimeZone?timezone = null)
 {
     if (DateTimeValue.TryCreateFromFormat(ctx, format, time, timezone, out var value))
     {
         return(new DateTimeImmutable(value));
     }
     else
     {
         return(null);
     }
 }