GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATE::ISO (3)

.ds Aq ’

NAME

Date::ISO - Perl extension for converting dates between ISO and Gregorian formats.

CONTENTS

SYNOPSIS



  use Date::ISO;
  $iso = Date::ISO->new( iso => $iso_date_string );
  $iso = Date::ISO->new( epoch => $epoch_time );
  $iso = Date::ISO->new( ical => $ical_string );
  $iso = Date::ISO->new( year => $year, month => $month,
                         day => $day );
  $iso = Date::ISO->new( year => $year, week => $week,
                         weekday => $weekday );

  $year = $iso->year;

  $iso_year = $iso->iso_year()
  $iso_week = $iso->iso_week();
  $week_day = $iso->iso_week_day();

  $month = $iso->month();
  $day = $iso->day();



And, for backward compatibility:



  ($yearnumber, $weeknumber, $weekday) = iso($year, $month, $day);
  ($yearnumber, $weeknumber, $weekday) = localiso(time);
  ($year, $month, $day) = inverseiso($iso_year, $iso_week,
                                     $iso_week_day);



DESCRIPTION

Convert dates between ISO and Gregorian formats.

    new



    my $iso = Date::ISO->new( iso => $iso_date_string );
    my $iso = Date::ISO->new( epoch = $epoch_time );



Set the time to 2:30:25 on the date specified in $iso_date_string
my $iso = Date::ISO->new( iso => $iso_date_string, hour => 2, min => 30, sec => 25 );

And, since this is a Date::ICal subclass ...



    my $iso = Date::ISO->new( ical => $ical_string );
    $ical = $iso->ical;



Accepted ISO date string formats are:



    1997-02-05 (Feb 5, 1997)
    19970205 (Same)
    199702 (February 1997)
    1997-W06 (6th week, 1997)
    1997W06 (Same)
    1997-W06-2 (6th week, 2nd day)
    1997W062 (Same as above)
    1997-035 (35th day of 1997)
    1997035 (Same as above)



2-digit representations of the year are not supported at this time.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATE::ISO (3) 2014-03-07

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.