Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.620.875 Times

Log::Log4perl::DateFormat 1.11

  Date Added: January 25, 2010  |  Visits: 811

Log::Log4perl::DateFormat

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 downloads)



Log::Log4perl::DateFormat is a Log4perl advanced date formatter helper class. SYNOPSIS use Log::Log4perl::DateFormat; my $format = Log::Log4perl::DateFormat->new("HH:mm:ss,SSS"); # Simple time, resolution in seconds my $time = time(); print $format->format($time), "n"; # => "17:02:39,000" # Advanced time, resultion in milliseconds use Time::HiRes; my ($secs, $msecs) = Time::HiRes::gettimeofday(); print $format->format($secs, $msecs), "n"; # => "17:02:39,959" Log::Log4perl::DateFormat is a low-level helper class for the advanced date formatting functions in Log::Log4perl::Layout::PatternLayout. Unless youre writing your own Layout class like Log::Log4perl::Layout::PatternLayout, theres probably not much use for you to read this. Log::Log4perl::DateFormat is a formatter which allows dates to be formatted according to the log4j spec on http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html which allows the following placeholders to be recognized and processed: Symbol Meaning Presentation Example ------ ------- ------------ ------- G era designator (Text) AD y year (Number) 1996 M month in year (Text & Number) July & 07 d day in month (Number) 10 h hour in am/pm (1~12) (Number) 12 H hour in day (0~23) (Number) 0 m minute in hour (Number) 30 s second in minute (Number) 55 S millisecond (Number) 978 E day in week (Text) Tuesday D day in year (Number) 189 F day of week in month (Number) 2 (2nd Wed in July) w week in year (Number) 27 W week in month (Number) 2 a am/pm marker (Text) PM k hour in day (1~24) (Number) 24 K hour in am/pm (0~11) (Number) 0 z time zone (Text) Pacific Standard Time Z RFC 822 time zone (Text) -0800 escape for text (Delimiter) single quote (Literal) For example, if you want to format the current Unix time in "MM/dd HH:mm" format, all you have to do is this: use Log::Log4perl::DateFormat; my $format = Log::Log4perl::DateFormat->new("MM/dd HH:mm"); my $time = time(); print $format->format($time), "n"; While the new() method is expensive, because it parses the format strings and sets up all kinds of structures behind the scenes, followup calls to format() are fast, because DateFormat will just call localtime() and sprintf() once to return the formatted date/time string. So, typically, you would initialize the formatter once and then reuse it over and over again to display all kinds of time values. Also, for your convenience, the following predefined formats are available, just as outlined in the log4j spec: Format Equivalent Example ABSOLUTE "HH:mm:ss,SSS" "15:49:37,459" DATE "dd MMM yyyy HH:mm:ss,SSS" "06 Nov 1994 15:49:37,459" ISO8601 "yyyy-MM-dd HH:mm:ss,SSS" "1999-11-27 15:49:37,459" APACHE "[EEE MMM dd HH:mm:ss yyyy]" "[Wed Mar 16 15:49:37 2005]" So, instead of passing Log::Log4perl::DateFormat->new("HH:mm:ss,SSS"); you could just as well say Log::Log4perl::DateFormat->new("ABSOLUTE"); and get the same result later on..

Requirements: No special requirements
Platforms: Linux
Keyword: Advanced Date Dateformat Format Hh Libraries Mm Number Programming Sss Text Time
Users rating: 0/10

License: Freeware Size: 225.28 KB
USER REVIEWS
More Reviews or Write Review


LOG::LOG4PERL::DATEFORMAT RELATED
Screen Savers  -  3D BallClock ScreenSaver 1.0
This screensaver shows on your screen 3D clock (time format - HH:MM:SS) rotating, digits are constructed from small balls. You may choose color of digits (balls), speed and rotation axis.
244 KB  
Modules  -  Casecode table 6.x-1.0-beta1
Two fields are displayed by the widget instead of one.The values of the two fields will be merged to value1|value2 where value1 must be numeric and value2 must not be empty.If the widget is used for a multiple field the final list of values will...
10 KB  
Education  -  Chinese by Living Language 2.5
Introducing our Universal App! With just one purchase you can access Chinese by Living Language on your iPad, iPhone or iPod. Buy the Complete Course OR buy a single level (Essential, Intermediate, or Advanced). . . . An excellent...
39.7 MB  
Education  -  Chinese by Living Language for iPhone 2.5
New Look for Living Language! Buy the Complete Course OR buy a single level (Essential, Intermediate, or Advanced). . . . An excellent format and quite engaging . . . Im pleased with the seamless integration of grammar and...
31.3 MB  
Entertainment  -  QR Coder Free 1.1
Create QR Code from URL, Text or vCard Scan diffrent types of barcodes Create your own QR Codes and save or send directly by mail! Templates for contacts in vCard format, URL, telephone number, or simply text. The functions...
9.6 MB  
Finance  -  Forex Guild 3.0.0.0
Forex converter is an easy to use currency conversion tool that provides Forex in an interesting and useful format. User can view number of currencies against a base currency set. The application shows the how much the base currency is worth for a...
1024 KB  
Productivity  -  PhotoFolder 1.0.0.5
Photo Folder Previewer, showing picture preview, file name, file size, file date, and other information. Showing total number of files per folder. and v1.0.0.4: Pin PhotoTile v1.0.0.5: Slide Show Photo Requirements: Windows Phone...
1024 KB  
Development Editors  -  MAX's HTML Beauty++ 2004 2.0
MAX's HTML Beauty++ 2004 is an advanced HTML editor that can edit as many files at a time as you want. Built-In Image Browser Viewer with GIF Optimize function and ability to convert images to WBMP image format which is used by WAP-compatible...
1.73 MB  
Calendars & Scheduling Tools  -  etm 881
etm is a Python-based application that was designed to provide a simple and intuitive format that can make use of plain text files to store data. It also features a Command Line Interface for viewing events and tasks in a variety of convenient...
 
Development Tools  -  Advanced Modern Control System Theory and Design 1.0
This book is designed for an advanced course and is a companion volume to the introductory text, Modern Control System Theory and Design, 2e. In addition, it can serve as a text for practicing control system engineers who need to learn more...
757.76 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB