On Thu, Sep 4, 2014 at 4:06 PM, Jon Harper <jon.harpe...@gmail.com> wrote:
> How about:
> : today ( -- timestamp ) now midnight instant >>gmt-offset ; inline
>
Or really just
: today ( -- timestamp ) gmt midnight ; inline
if I'm not mistaken. It's a short trip from `today`'s current definition:
http://docs.factorcode.org/content/word-today,calendar.html
As far as I know, that goes for the other words: their reliance is on `now`
rather than `gmt` (e.g.,
http://docs.factorcode.org/content/word-ago%2Ccalendar.html and
http://docs.factorcode.org/content/word-hence%2Ccalendar.html).
I guess less drastic would be for `ymd>timestamp` to just use local time;
right now it's defined with `<date-gmt>`:
http://docs.factorcode.org/content/word-%28ymd__gt__timestamp%29%2Ccalendar.format.html
I know John mentioned it, but I'm not sure why that shouldn't just be
`<date>`, since most other things appear to use local time as well (per the
above).
> If backwards compatibility is an issue, we can always create new words
> instead of changing the existing ones (ie leave "today" as it is, and
> create "today-date").
>
Ah, man, we could be just like Ruby on Rails with the `Date.current` &
`Date.today` distinction! :)
Sorry, it's too far past my bed time to make useful contributions to the
discussion, haha. That, and date & time libraries are a headache.
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk