Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Date::Manip 6.25

    Download button

    No screenshots available
    Downloads: 956  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.3/5)
    18 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sullivan Beck | More programs
    Perl Artistic License / FREE
    November 1st, 2011, 12:56 GMT [view history]
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Date::Manip description

    Date manipulation routines

    Date::Manip is a date manipulation routines.

    SYNOPSIS

    use Date::Manip;

    $version = DateManipVersion;

    $date = ParseDate(@args);
    $date = ParseDate($string);
    $date = ParseDate($string);

    @date = UnixDate($date,@format);
    $date = UnixDate($date,@format);

    $delta = ParseDateDelta(@args);
    $delta = ParseDateDelta($string);
    $delta = ParseDateDelta($string);

    @str = Delta_Format($delta,$dec,@format);
    $str = Delta_Format($delta,$dec,@format);

    $recur = ParseRecur($string,$base,$date0,$date1,$flags);
    @dates = ParseRecur($string,$base,$date0,$date1,$flags);

    $flag = Date_Cmp($date1,$date2);

    $d = DateCalc($d1,$d2 [,$errref] [,$del]);

    $date = Date_SetTime($date,$hr,$min,$sec);
    $date = Date_SetTime($date,$time);

    $date = Date_SetDateField($date,$field,$val [,$nocheck]);

    $date = Date_GetPrev($date,$dow,$today,$hr,$min,$sec);
    $date = Date_GetPrev($date,$dow,$today,$time);

    $date = Date_GetNext($date,$dow,$today,$hr,$min,$sec);
    $date = Date_GetNext($date,$dow,$today,$time);

    $name = Date_IsHoliday($date);

    $listref = Events_List($date);
    $listref = Events_List($date0,$date1);

    $date = Date_ConvTZ($date);
    $date = Date_ConvTZ($date,$from);
    $date = Date_ConvTZ($date,"",$to);
    $date = Date_ConvTZ($date,$from,$to);

    $flag = Date_IsWorkDay($date [,$flag]);

    $date = Date_NextWorkDay($date,$off [,$time]);

    $date = Date_PrevWorkDay($date,$off [,$time]);

    $date = Date_NearestWorkDay($date [,$tomorrowfirst]);

    &Date_Init();
    &Date_Init("VAR=VAL","VAR=VAL",...);
    @list = Date_Init();
    @list = Date_Init("VAR=VAL","VAR=VAL",...);

    The above routines all check to make sure that Date_Init is called. If it hasn't been, they will call it automatically. As a result, there is usually no need to call Date_Init explicitely unless you want to change some of the config variables (described below). They also do error checking on the input.

    The routines listed below are intended primarily for internal use by other Date::Manip routines. They do little or no error checking, and do not explicitely call Date_Init. Those functions are all done in the main Date::Manip routines above.

    Because they are significantly faster than the full Date::Manip routines, they are available for use with a few caveats. Since little or no error checking is done, it is the responsibility of the programmer to ensure that valid data (AND valid dates) are passed to them. Passing invalid data (such as a non-numeric month) or invalid dates (Feb 31) will fail in unpredictable ways (possibly returning erroneous results). Also, since Date_Init is not called by these, it must be called explicitely by the programmer before using these routines.

    In the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted to a 4 digit year based on the variable YYtoYYYY described below). Month and day should be numeric in all cases. Most (if not all) of the information below can be gotten from UnixDate which is really the way I intended it to be gotten, but there are reasons to use these (these are significantly faster).

    $day = Date_DayOfWeek($m,$d,$y);
    $secs = Date_SecsSince1970($m,$d,$y,$h,$mn,$s);
    $secs = Date_SecsSince1970GMT($m,$d,$y,$h,$mn,$s);
    $days = Date_DaysSince1BC($m,$d,$y);
    $day = Date_DayOfYear($m,$d,$y);
    ($y,$m,$d,$h,$mn,$s) = Date_NthDayOfYear($y,$n);
    $days = Date_DaysInYear($y);
    $days = Date_DaysInMonth($m,$y);
    $wkno = Date_WeekOfYear($m,$d,$y,$first);
    $flag = Date_LeapYear($y);
    $day = Date_DaySuffix($d);
    $tz = Date_TimeZone();


    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · Recurrences were reworked in a slightly backward incompatible way to improve their usefulness.
    · The time zone DB was updated.

      


    TAGS:

    manipulation routines | date manipulation | Perl module | module | manipulation | routines

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM