Newsgroups: perl.perl6.language
From: dsto...@dstorrs.com (David Storrs)
Date: Tue, 31 May 2005 12:14:00 -0400
Subject: Re: date and time formatting
On May 31, 2005, at 9:51 AM, Rob Kinyon wrote: > On 5/31/05, Nathan Gray <kolib...@graystudios.org> wrote: It's back to the old question of "what's in core?" Are dates and >> As I am interested in human-readable dates and times, and having > What's wrong with porting DateTime? > Rob times something that are used in such a large proportion of programs that they deserve to be shipped in the basic grammar? Or perhaps in the basic set of packages? Perl 5 has an entire swath of modules designed to manipulate dates --Dks You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: rob.kin...@gmail.com (Rob Kinyon)
Date: Tue, 31 May 2005 13:16:32 -0400
Local: Tues, May 31 2005 1:16 pm
Subject: Re: date and time formatting
> > What's wrong with porting DateTime? Which still begs the question - why not port DateTime to P6? Why can't > It's back to the old question of "what's in core?" Are dates and > Perl 5 has an entire swath of modules designed to manipulate dates installing a module provide new keywords? Rob You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: r...@rodadams.net (Rod Adams)
Date: Tue, 31 May 2005 13:11:21 -0500
Local: Tues, May 31 2005 2:11 pm
Subject: Re: date and time formatting
Nathan Gray wrote: Can we please make sure that strftime() is _not_ OS dependent like the > possibly as an strftime() pattern. POSIX version is now? -- Rod Adams You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: d...@pobox.com (Jonathan Scott Duff)
Date: Tue, 31 May 2005 14:04:00 -0500
Subject: Re: date and time formatting
On Tue, May 31, 2005 at 01:11:21PM -0500, Rod Adams wrote: I don't mind an OS dependent strftime() as long as we have some > Nathan Gray wrote: > >possibly as an strftime() pattern. > Can we please make sure that strftime() is _not_ OS dependent like the formatter that is OS independent. I expect that strftime() will eventually fall into disuse as people use the newer, better formatters. -Scott You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: dsto...@dstorrs.com (David Storrs)
Date: Tue, 31 May 2005 14:31:33 -0400
Local: Tues, May 31 2005 2:31 pm
Subject: Re: date and time formatting
On May 31, 2005, at 2:22 PM, Rob Kinyon wrote:
>> my ($launch_date = now() + 6 weeks) but time(9am); Works for me. > Sure. $launch_date is of type DateTime. It will numify to the > Frankly, I think we're in violent agreement here. Sounds like it. I don't really care if it's built in or comes in a module. I do think that date manipulation is common enough that, if it's in a module, the module should come in the "basic set". I met a guy once who made his living doing Java programming. I asked To put it another way--it's one of those hard things that Perl 6 is --Dks You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: dsto...@dstorrs.com (David Storrs)
Date: Tue, 31 May 2005 14:10:32 -0400
Local: Tues, May 31 2005 2:10 pm
Subject: Re: date and time formatting
On May 31, 2005, at 1:16 PM, Rob Kinyon wrote: - No reason it can't. Nor did I imply otherwise. - I didn't say we shouldn't port DateTime. My point was simply that, Personally, I've always found date handling to be difficult. The Perhaps something like the typed operations that were discussed my ($launch_date = now() + 6 weeks) but time(9am); # outstanding_tickets() returns user-written ticket objects; # Prints 'Meetings are...is Sunday, June 19.; The above examples are just noodlings and are not well thought out, --Dks You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: rob.kin...@gmail.com (Rob Kinyon)
Date: Tue, 31 May 2005 14:22:05 -0400
Local: Tues, May 31 2005 2:22 pm
Subject: Re: date and time formatting
> - I didn't say we shouldn't port DateTime. My point was simply that, What I'm trying to get at isn't that DateTime's API should be > based on the amount of date-related code on CPAN, this is an issue > that many people care about quite a bit. We would probably be well > served to consider it carefully and decide on what semantics we > really want. Maybe DateTime is exactly what everyone wants and all > we need to do is port it. On the other hand, there is something to > be said for Nathan's approach; isn't it worth discussing? preserved. I'm saying that the concept of DateTime should be ported. Core or not core - it doesn't matter. When use'd (or installed), it should override now() (and anyone else we can think of) to return an object that DWIMs, plus provides the interface you've outlined below. > Perhaps something like the typed operations that were discussed Sure. $launch_date is of type DateTime. It will numify to the > recently: > my ($launch_date = now() + 6 weeks) but time(9am); seconds-since-the-epoch, stringify to some date string, and provide all the neat-o-keen methods you want it to have. Frankly, I think we're in violent agreement here. I don't think this Well, I always expect DBI to be around ... :-) Rob You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: s...@vilain.net (Sam Vilain)
Date: Wed, 01 Jun 2005 15:42:57 +1200
Local: Tues, May 31 2005 11:42 pm
Subject: Re: date and time formatting
Rob Kinyon wrote: I've made a start on this. See ext/Date in pugs. I don't think that > What I'm trying to get at isn't that DateTime's API should be > preserved. I'm saying that the concept of DateTime should be ported. > Core or not core - it doesn't matter. When use'd (or installed), it > should override now() (and anyone else we can think of) to return an > object that DWIMs, plus provides the interface you've outlined below. your views are necessarily contrary. The biggest reason I didn't use DateTime was that I found it awkward The "Date" and "Duration" roles are extremely minimal; see http://svn.openfoundry.org/pugs/ext/Date/lib/Date.pm The major API is described at: http://svn.openfoundry.org/pugs/ext/Date/lib/Date/Gregorian.pod This module is supposed to be somewhere between DateTime and With a bit of luck, all Date implementation can share this `Date' Sam. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: kolib...@graystudios.org (Nathan Gray)
Date: Wed, 1 Jun 2005 09:32:39 -0400
Local: Wed, Jun 1 2005 9:32 am
Subject: Re: date and time formatting
On Wed, Jun 01, 2005 at 03:42:57PM +1200, Sam Vilain wrote: That's what I'm looking for. Thank you! > I've made a start on this. See ext/Date in pugs. I don't think that > your views are necessarily contrary. So, if we continue following this API, Perl6 core will contain time(), but no localtime() nor gmtime(). The Date module will provide human readable date and time strings, and basic date math. > With a bit of luck, all Date implementation can share this `Date' So further date manipulation could be provided by other date modules, > Role, and Gregorian calendar modules share the `Date::Gregorian' Role, > so that the multitude of implementations that crop up will be mutually > exchangable, and the simple case fast, efficient and useful. hopefully within the same framework. Sounds good to me. -kolibrie You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.language
From: par...@seamons.com (Paul Seamons)
Date: Thu, 2 Jun 2005 09:43:56 -0600
Local: Thurs, Jun 2 2005 11:43 am
Subject: Re: date and time formatting
> So, if we continue following this API, Perl6 core will contain time(), localtime() and gmtime() seem fairly core to me. The array contexts are > but no localtime() nor gmtime(). The Date module will provide human > readable date and time strings, and basic date math. simple, and the scalar context is an RFC valid string. Nothing too heavy there. The time() function is "typically" only moderately useful without localtime(). Paul You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2009 Google |