IPB
>  Man Pages > Linux > openSUSE 10.2 > Section 3 > Date::Format man page

Date::Format man page

Section 3 - openSUSE 10.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


Date::Format(3)       User Contributed Perl Documentation      Date::Format(3)



NAME
       Date::Format - Date formating subroutines

SYNOPSIS
               use Date::Format;

               @lt = localtime(time);

               print time2str($template, time);
               print strftime($template, @lt);

               print time2str($template, time, $zone);
               print strftime($template, @lt, $zone);

               print ctime(time);
               print asctime(@lt);

               print ctime(time, $zone);
               print asctime(@lt, $zone);

DESCRIPTION
       This module provides routines to format dates into ASCII strings. They
       correspond to the C library routines "strftime" and "ctime".

       time2str(TEMPLATE, TIME [, ZONE])
           "time2str" converts "TIME" into an ASCII string using the conver-
           sion specification given in "TEMPLATE". "ZONE" if given specifies
           the zone which the output is required to be in, "ZONE" defaults to
           your current zone.

       strftime(TEMPLATE, TIME [, ZONE])
           "strftime" is similar to "time2str" with the exception that the
           time is passed as an array, such as the array returned by "local-
           time".

       ctime(TIME [, ZONE])
           "ctime" calls "time2str" with the given arguments using the conver-
           sion specification "%a %b %e %T %Y\n"

       asctime(TIME [, ZONE])
           "asctime" calls "time2str" with the given arguments using the con-
           version specification "%a %b %e %T %Y\n"

MULTI-LANGUAGE SUPPORT
       Date::Format is capable of formating into several languages, these are
       English, French, German and Italian. Changing the language is done via
       a static method call, for example

               Date::Format->language('German');

       will change the language in which all subsequent dates are formatted.

       This is only a first pass, I am considering changing this to be

               $lang = Date::Language->new('German');
               $lang->time2str("%a %b %e %T %Y\n", time);

       I am open to suggestions on this.

CONVERSION SPECIFICATION
       Each conversion specification  is  replaced  by  appropriate characters
       as   described  in  the  following  list.   The appropriate  characters
       are  determined  by   the   LC_TIME category of the program's locale.

               %%      PERCENT
               %a      day of the week abbr
               %A      day of the week
               %b      month abbr
               %B      month
               %c      MM/DD/YY HH:MM:SS
               %C      ctime format: Sat Nov 19 21:05:57 1994
               %d      numeric day of the month, with leading zeros (eg 01..31)
               %e      numeric day of the month, without leading zeros (eg 1..31)
               %D      MM/DD/YY
               %G      GPS week number (weeks since January 6, 1980)
               %h      month abbr
               %H      hour, 24 hour clock, leading 0's)
               %I      hour, 12 hour clock, leading 0's)
               %j      day of the year
               %k      hour
               %l      hour, 12 hour clock
               %L      month number, starting with 1
               %m      month number, starting with 01
               %M      minute, leading 0's
               %n      NEWLINE
               %o      ornate day of month -- "1st", "2nd", "25th", etc.
               %p      AM or PM
               %P      am or pm (Yes %p and %P are backwards :)
               %q      Quarter number, starting with 1
               %r      time format: 09:05:57 PM
               %R      time format: 21:05
               %s      seconds since the Epoch, UCT
               %S      seconds, leading 0's
               %t      TAB
               %T      time format: 21:05:57
               %U      week number, Sunday as first day of week
               %w      day of the week, numerically, Sunday == 0
               %W      week number, Monday as first day of week
               %x      date format: 11/19/94
               %X      time format: 21:05:57
               %y      year (2 digits)
               %Y      year (4 digits)
               %Z      timezone in ascii. eg: PST
               %z      timezone in format -/+0000

       %d, %e, %H, %I, %j, %k, %l, %m, %M, %q, %y and %Y can be output in
       Roman numerals by prefixing the letter with "O", e.g. %OY will output
       the year as roman numerals.

AUTHOR
       Graham Barr <gbarr@pobox.com>

COPYRIGHT
       Copyright (c) 1995-1999 Graham Barr. All rights reserved. This program
       is free software; you can redistribute it and/or modify it under the
       same terms as Perl itself.



perl v5.8.8                       2006-11-25                   Date::Format(3)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Sat Sep 8 16:37:23 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

svn man page (6161 hits)
(FreeBSD 6.2)

sqlite3 man page (5596 hits)
(openSUSE 10.2)

adv_cap_autoneg man page (5045 hits)
(Solaris 10 11_06)

CPAN man page (4791 hits)
(Suse Linux 10.1)

ssh man page (4439 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (3525 hits)
(Solaris 10 11_06)

signal man page (3394 hits)
(Suse Linux 10.1)

netcat man page (3373 hits)
(Suse Linux 10.1)

pprosetup man page (2885 hits)
(Solaris 10 11_06)

startproc man page (2738 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Summer Activities :: Through Glass Touch Panel :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum