NAME Mail::Message::Date - utilities for date and time. SYNOPSIS use Mail::Message::Date; $date = new Mail::Message::Date time; # get the date in $style format $date->{ log_file_style } $date->log_file_style DESCRIPTION The style you can use follows: style example ---------------------------------------------- log_file_style 01/01/07 21:06:19 mail_header_style Sun, 7 Jan 2001 21:06:19 +0900 YYYYMMDD 20010107 current_time 200101072106 precise_current_time 20010107210619 METHODS You can also method like $date->$style() style. specify the "style" name described above as a method. log_file_style() mail_header_style() YYYYMMDD() current_time() precise_current_time() stardate() return STAR TREK stardate :-) set($date) $date = new Mail::Message::Date; $date->set("Tue Dec 30 17:06:34 JST 2003"); $date->to_unixtime(); YET ANOTHER STYLE UTILITIES date_to_unixtime($date) eat date string in several patterns and return the corresponding unix time. For example, let $date be Mon Jul 2 22:59:45 2001 "date_to_unixtime($date)" returns 994082385 You can use like this. use Mail::Message::Date; $dp = Mail::Message::Date; $unixtime = $dp->date_to_unixtime( $date ); CODING STYLE See "http://www.fml.org/software/FNF/" on fml coding style guide. AUTHOR Ken'ichi Fukamachi COPYRIGHT Copyright (C) 2000,2001,2002,2003,2004,2005 Ken'ichi Fukamachi Copyright (C) 2009,2010,2012 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. HISTORY Mail::Message::Date first appeared in fml8 mailing list driver package. See "http://www.fml.org/" for more details. "date_to_unixtime" is imported from fml 4.0-current libmti.pl.