modules/portlib/src/main/native/port/shared/hystrftime.c File Reference


Detailed Description

Time formatting utilities.

#include <string.h>
#include "hycomp.h"
#include "hyport.h"

Functions

U_32 VMCALL hystrftime (struct HyPortLibrary *portLibrary, char *buf, U_32 bufLen, const char *format)
 Returns the current time in as a formatted string.


Function Documentation

U_32 VMCALL hystrftime ( struct HyPortLibrary portLibrary,
char *  buf,
U_32  bufLen,
const char *  format 
)

Returns the current time in as a formatted string.

Formatted according to the 'format' parameter.

Parameters:
[in] portLibrary The port library.
[in,out] buf A pointer to a character buffer where the resulting time string will be stored.
[in] bufLen The length of the 'buf' character buffer.
[in] format The format string, ordinary characters placed in the format string are copied. to buf without conversion. Conversion specifiers are introduced by a '' character, and are replaced in buf as follows:.
  • b The abbreviated month name in english
  • d The day of the month as a decimal number (range 0 to 31).
  • H The hour as a decimal number using a 24-hour clock (range 00 to 23).
  • m The month as a decimal number (range 01 to 12).
  • M The minute as a decimal number.
  • S The second as a decimal number.
  • Y The year as a decimal number including the century.
  • %% A literal '' character.
  • all other '' specifiers will be ignored
Returns:
The number of characters placed in the array buf, not including NULL terminator. If the value equals 'bufLen', it means that the array was too small.


Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.