> I haven't worked on this since the beginning of April. I believe this is most of
> the date specifications - not including the week formats. Week and UTC offset
> handling, time formats, and date + time formats are left (actually shouldn't be that
> bad). Although I don't remember why I stopped working on this.
Actually the time formats can be skipped until DT::Time comes into existence. The
date + time + offset formats are simple... should be something like the pasted code.
The week stuff still has to be handled thou. hmmm...
-J
--
{
#YYYYMMDDThhmmss
#YYYY-MM-DDThh:mm:ss
regex => qr/^ (\d{4}) -?? (\d\d) -?? (\d\d) T (\d\d) :?? (\d\d) :?? (\d\d)
$/x,
params => [ qw( year month day hour minute second ) ],
extra => { time_zone => 'floating' },
},
{
#YYYYMMDDThhmmssZ
#YYYY-MM-DDThh:mm:ssZ
regex => qr/^ (\d{4}) -?? (\d\d) -?? (\d\d) T (\d\d) :?? (\d\d) :?? (\d\d) Z
$/x,
params => [ qw( year month day hour minute second ) ],
extra => { time_zone => 'UTC' },
},
{
#YYYYMMDDThhmmss+hhmm
#YYYY-MM-DDThh:mm:ss+hh:mm
regex => qr/^ (\d{4}) -?? (\d\d) -?? (\d\d) T (\d\d) :?? (\d\d) :?? (\d\d)
(\+\d\d :?? \d\d) $/x,
params => [ qw( year month day hour minute second time_zone ) ],
postprocess => \&_normalize_offset,
},
{
#YYYYMMDDThhmmss+hh
#YYYY-MM-DDThh:mm:ss+hh
regex => qr/^ (\d{4}) -?? (\d\d) -?? (\d\d) T (\d\d) :?? (\d\d) :?? (\d\d)
(\+\d\d) $/x,
params => [ qw( year month day hour minute second time_zone ) ],
postprocess => \&_fix_2_digit_offset,
},