Beispiel #1
0
 /// <summary>
 /// Parses a string representation of a date, and returns the number of milliseconds since
 /// January 1, 1970, 00:00:00 UTC.
 /// </summary>
 /// <param name="dateStr"> A string representing a date, expressed in RFC 1123 format. </param>
 public static double Parse(string dateStr)
 {
     return(ToJSDate(DateParser.Parse(dateStr)));
 }
Beispiel #2
0
 /// <summary>
 /// Creates a new Date instance from the given date string.
 /// </summary>
 /// <param name="prototype"> The next object in the prototype chain. </param>
 /// <param name="dateStr"> A string representing a date, expressed in RFC 1123 format. </param>
 public Date(string dateStr)
     : this(DateParser.Parse(dateStr))
 {
 }