//-----------------------------------------------------------------------------
// Copyright © 2004 - Philip Howard - All rights reserved
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//-----------------------------------------------------------------------------
// package	libh/time
// homepage	http://libh.slashusr.org/
//-----------------------------------------------------------------------------
// author	Philip Howard
// email	libh at ipal dot org
// homepage	http://phil.ipal.org/
//-----------------------------------------------------------------------------
// This file is best viewed using a fixed spaced font such as Courier
// and in a display at least 120 columns wide.
//-----------------------------------------------------------------------------

__FMACRO_BEGIN__
//-----------------------------------------------------------------------------
// macro	eday_to_printf
//
// purpose	Convert an Earth Day value to a formatted string and output.
//
// arguments	1 (const char *) format string
//		2 (eday_t) Earth Day value
//
// returns	(int) return value from fputs()
//
// format	The format string is copied with format specifiers replaced
//		with character expressions of the specified date or time
//		component.  The available specifiers are:
//		%g	Specify Gregorian calendar (no output)
//		%j	Specify Julian calendar (no output)
//		%l	Specify lower case conversion (no output)
//		%u	Specify upper case conversion (no output)
//		%n	Specify no case conversion (no output)
//		%E	(1) Earth Time as a decimal number
//		%e	(1) Earth Day as a decimal number
//		%t	(1) System time as a decimal number (e.g. time())
//		%J	(1,0) Julian Date (floating point format)
//		%Y	(04) Year number in the specified calendar
//		%Z	(04) Year number with BC if needed
//		%m	(02) Month number in the specified calendar
//		%d	(02) Day of month in the specified calendar
//		%D	(03) Day of year in the specified calendar
//		%w	(1) Day of week number (0=Sunday, 6=Saturay)
//		%W	(02) Week number in the year (0..53)
//		%A	Day of week name full
//		%a	Day of week name abbreviated
//		%B	Month of year name full
//		%b	Month of year name abbreviated
//		%H	(02) Hours (00..23) of day
//		%M	(02) Minutes (00..59) of hour
//		%S	(02) Seconds (00..59) of minute
//		%F	(03) Fractions of a second (default milliseconds)
//		%U	(06) Fractions of a second (default microseconds)
//		%N	(09) Fractions of a second (default nanoseconds)
//		%s	(05) Seconds (00000..86401) of day
//		%L	(06) Lilian day (LDAY, IBM Y2K hack)
//		%X	(06) eXchange day (XDAY, Bob Bemer Y2K hack)
//		%I	(02) Hour (12,01..11) of meridian
//		%p	Meridian hour designator, AM or PM
//		%T	short form for "%H:%M:%S"
//		%r	short form for "%I:%M:%S %p"
//		%%	Literal "%" character
//
// note		Although time format specifiers are valid when formatting
//		an Earth Day value, they are always converted from 0 which
//		represents the beginning of the given day.
//
// note		Although many specifiers are the same as those defined for
//		use in strftime(), many others are different.
//
// modifiers	A sequence of decimal digits may modify the minimum size
//		and leading character for fields.  Some default to a normal
//		size and this may be overridden.  For example, the day of
//		month defaults to a size specifier of "02" if none is given.
//		To force a date to have 1 digit when less than 10, use "1"
//		as the modifier like "%1d".
//-----------------------------------------------------------------------------
#define eday_to_printf(f,d) eday_to_fprintf(stdout,(f),(d))

__FMACRO_END__

