| ... | ... | @@ -46,6 +46,18 @@ pub const DateTime = struct { |
| 46 | 46 | .weekday = .Thu, |
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | pub fn eql(self: Self, other: Self) bool { |
| 50 | return self.ms == other.ms and |
| 51 | self.seconds == other.seconds and |
| 52 | self.minutes == other.minutes and |
| 53 | self.hours == other.hours and |
| 54 | self.days == other.days and |
| 55 | self.months == other.months and |
| 56 | self.years == other.years and |
| 57 | self.timezone == other.timezone and |
| 58 | self.weekday == other.weekday; |
| 59 | } |
| 60 | |
| 49 | 61 | pub fn addMs(self: Self, count: u64) Self { |
| 50 | 62 | if (count == 0) return self; |
| 51 | 63 | var result = self; |