Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

PHP::DateTime
Clone of PHP's date and time functions.

PHP::DateTime - Clone of PHP's date and time functions.


NAME

PHP::DateTime - Clone of PHP's date and time functions.


SYNOPSIS


  use PHP::DateTime;

  

  if( checkdate($month,$day,$year) ){ print 'The date is good.'; }

  

  print date( $format, $time );

  print date( $format ); # Defaults to the current time.

  

  @d = getdate(); # A list at the current time.

  @d = getdate($time); # A list at the specified time.

  $d = getdate($time); # An array ref at the specified time.

  

  my @g = gettimeofday(); # A list.

  my $g = gettimeofday(); # An array ref.

  

  my $then = mktime( $hour, $min, $sec, $month, $day, $year );


DESCRIPTION

Duplicates some of PHP's date and time functions. Why? I can't remember. It should be useful if you are trying to integrate your perl app with a php app. Much like PHP this module gratuitously exports all its functions upon a use(). Neat, eh?


METHODS

All of these methods should match PHP's methods exactly.


  - Months are 1-12.

  - Days are 1-31.

  - Years are in four digit format (1997, not 97).

checkdate


  if( checkdate($month,$day,$year) ){ print 'The date is good.'; }

http://php.net/manual/en/function.checkdate.php

date


  print date( $format, $time );

  print date( $format ); # Defaults to the current time.

http://php.net/manual/en/function.date.php

getdate


  @d = getdate(); # A list at the current time.

  @d = getdate($time); # A list at the specified time.

  $d = getdate($time); # An array ref at the specified time.

http://php.net/manual/en/function.getdate.php

gettimeofday


  my %g = gettimeofday(); # A hash.

  my $g = gettimeofday(); # An hash ref.

http://php.net/manual/en/function.gettimeofday.php

mktime


  my $then = mktime( $hour, $min, $sec, $month, $day, $year );

http://php.net/manual/en/function.mktime.php


PREREQUISITES

the Time::DaysInMonth manpage

the Time::Timezone manpage

the Time::HiRes manpage

the Time::Local manpage


AUTHOR

Copyright (C) 2003-2005 Aran Clary Deltac (CPAN: BLUEFEET)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Address bug reports and comments to: <aran@arandeltac.com>. When sending bug reports, please provide the version of Geo::Distance, the version of Perl, and the name and version of the operating system you are using. Patches are welcome if you are brave!


SEE ALSO

http://php.net/manual/en/ref.datetime.php

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy