I think a constructor aimed at time_zone = 'local' makes sense. If not
that, then perhaps a class variable for DEFAULT_TIMEZONE or somesuch.
DateTime-now( time_zone = 'local' );
vs.
DateTime-local_now;
Saves an incredible 18 characters even with generous spacing.
Also, regarding the issue of
On Sunday, August 10, 2003, at 09:40 PM, Dave Rolsky wrote:
...unless that's the only way you will *ever* call now()! :)
Seriously, who is calling now() *without* time_zone = 'local'
arguments? I haven't done so yet, and would like to hear some
examples
of this usage.
Me, because I know that
On Sun, 10 Aug 2003, John Siracusa wrote:
If you only have a year and day of year, then having a from_day_of_year
constructor saves a _lot_ of calculation that end users have to do.
OTOH,
having to do 'DateTime-now(time_zone = local)' isn't very onerous
at
all.
...unless that's the
Joshua Hoblitt wrote:
Put a macro in your editor. :)
I can appreciate your point of view on this.
Consider, however, that DateTime will (and does) get used in quite a
number of one off scripts and one-liners. I do it all the time for
quick calculations where a full-blown script is unwarranted.
On Sunday, August 10, 2003, at 10:24 PM, David Wheeler wrote:
On Sunday, August 10, 2003, at 07:17 PM, John Siracusa wrote:
Obviously, you need currying. See Perl 6. Or create your own
subclass with its own now() method that passes the argument for you.
Or create a function that calls it for
On Sunday, August 10, 2003, at 06:07 PM, John Siracusa wrote:
...unless that's the only way you will *ever* call now()! :)
Obviously, you need currying. See Perl 6. Or create your own subclass
with its own now() method that passes the argument for you. Or create a
function that calls it for