diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-03-27 14:39:20 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-03-27 14:39:20 -0700 |
| commit | 5f676b8e19167e4b2f0cab817000134d8adecf09 (patch) | |
| tree | e1a7291d3df42804497d973ec38611797311ef89 /lib/core | |
| parent | 91d1189890fbfa04c731cb3dd4211a8d72017f6a (diff) | |
Fixed a typo and added comparison support for Time
Diffstat (limited to 'lib/core')
| -rw-r--r-- | lib/core/time.nom | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/core/time.nom b/lib/core/time.nom index 0a82fa5..88241d6 100644 --- a/lib/core/time.nom +++ b/lib/core/time.nom @@ -22,7 +22,7 @@ external: Hint: One of these two should be a number, not a time. ") - if ($other isn'tt "a Number"): + if ($other isn't "a Number"): $other = ($os.time $other) if ($self isn't "a Number"): @@ -37,7 +37,9 @@ external: if ($other is "a Time"): return ($os.difftime $self ($os.time $other)) return (a Time ($os.date "*t" ($self - $other, rounded))) - + + ($self, <$other) means (($self, since epoch) < ($other, since epoch)) + ($self, <=$other) means (($self, since epoch) <= ($other, since epoch)) ($self, as text) means ($os.date "%I:%M%p %a %b %e %Y" ($os.time $self)) ($self, as text in format $format) means ($os.date $format ($os.time $self)) ($self, since epoch) means ($os.time $self) |
