コード例 #1
0
 public long SetUtcFullYear(long year, long month, long date)
 {
     if (!timestamp.IsValid)
     {
         timestamp = EcmaTimestamp.LocalEpoch;
     }
     return(SetComponentsUtc(EcmaDateComponent.Year, year, month, date));
 }
コード例 #2
0
 public long SetFullYear(long year)
 {
     if (!timestamp.IsValid)
     {
         timestamp = EcmaTimestamp.LocalEpoch;
     }
     return(SetComponents(EcmaDateComponent.Year, year));
 }
コード例 #3
0
 public EcmaDate(long year, long month, long date, long hours, long minutes, long seconds, long milliseconds)
     : this(EcmaTimestamp.GetTimestamp(EcmaTimestamp.LocalEpoch.Value, 0, year, month, date, hours, minutes, seconds, milliseconds))
 {
 }
コード例 #4
0
 public EcmaDate(long year, long month, long date, long hours)
     : this(EcmaTimestamp.GetTimestamp(EcmaTimestamp.LocalEpoch.Value, 0, year, month, date, hours))
 {
 }
コード例 #5
0
 private long SetComponentsUtc(EcmaDateComponent start, params long[] args)
 {
     timestamp = (EcmaTimestamp)EcmaTimestamp.GetTimestampUtc(timestamp.Value, (int)start, args);
     return(timestamp.Value);
 }
コード例 #6
0
 public EcmaDate(long year, long month)
     : this(EcmaTimestamp.GetTimestamp(EcmaTimestamp.LocalEpoch.Value, 0, year, month))
 {
 }
コード例 #7
0
 public EcmaDate(long timestamp)
     : base(WellKnownObject.DatePrototype)
 {
     this.timestamp = new EcmaTimestamp(timestamp);
 }
コード例 #8
0
 public EcmaDate(DateTime dt)
     : this(EcmaTimestamp.FromNativeDateTime(dt).Value)
 {
 }
コード例 #9
0
 public long SetTime(long time)
 {
     timestamp = new EcmaTimestamp(time);
     return(timestamp.Value);
 }