|
|
Line 1: |
Line 1: |
− | <!-- Pod2Wiki=_preamble_
| |
− | This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
| |
− | -->{{Pod2Wiki}}{{API:Source|file=EPrints/Time.pm|package_name=EPrints::Time}}[[Category:API|Time]]<!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=head_name -->=NAME=
| |
− | '''EPrints::Time''' - Time and Date-related functions
| |
| | | |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=head_description -->=DESCRIPTION=
| |
− | This package contains functions related to time/date functionality.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_render_date -->==render_date==
| |
− |
| |
− | $xhtml = EPrints::Time::render_date( $session, $datevalue )
| |
− |
| |
− | Render the given date or date and time as a chunk of XHTML.
| |
− |
| |
− | The date given is in UTC but it will be rendered in the local offset.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_gmt_off -->==gmt_off==
| |
− |
| |
− | $xhtml = EPrints::Time::gmt_off()
| |
− |
| |
− | Render the current time offset in seconds. This just diffs gmtime and localtime.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_get_month_label -->==get_month_label==
| |
− |
| |
− | $label = EPrints::Time::get_month_label( $session, $monthid )
| |
− |
| |
− | Return a UTF-8 string describing the month, in the current lanugage.
| |
− |
| |
− | $monthid is an integer from 1 to 12.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_get_date_array -->==get_date_array==
| |
− |
| |
− | ($year,$month,$day) = EPrints::Time::get_date_array( [$time] )
| |
− |
| |
− | Static method that returns the given time (in UNIX time, seconds since 1.1.79) in an array.
| |
− |
| |
− | This is the local date not the UTC date.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_get_iso_date -->==get_iso_date==
| |
− |
| |
− | $datestamp = EPrints::Time::get_iso_date( [$time] )
| |
− |
| |
− | Method that returns the given time (in UNIX time, seconds since 1.1.79) in the format used by EPrints and MySQL (YYYY-MM-DD).
| |
− |
| |
− | This is the localtime date, not UTC.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_human_time -->==human_time==
| |
− |
| |
− | $timestamp = EPrints::Time::human_time( [$time] )
| |
− |
| |
− | Return a string describing the current local date and time in the current locale's format (see Perl's 'localtime).
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_get_iso_timestamp -->==get_iso_timestamp==
| |
− |
| |
− | $timestamp = EPrints::Time::get_iso_timestamp( [$time] );
| |
− |
| |
− | Return a UTC timestamp of the form YYYY-MM-DDTHH:MM:SSZ
| |
− |
| |
− | e.g. 2005-02-12T09:23:33Z
| |
− |
| |
− | $time in seconds from 1970. If not defined then assume current time.
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
| |
− | {{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_datestring_to_timet -->==datestring_to_timet==
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_get_date -->==get_date==
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_get_month_label_short -->==get_month_label_short==
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_human_delay -->==human_delay==
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=item_render_short_date -->==render_short_date==
| |
− |
| |
− | <!-- End of Pod2Wiki -->
| |
− | <!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
| |