Info-Mac Archive Downloads: dev/src/ SourceCode

Back to dev/src/ SourceCode

RFC 1123 (822) date formatter (C source code) (rfc-1123-822-date-formatter-c.hqx)

Download rfc-1123-822-date-formatter-c.hqx (14,103 KB)

Date: Fri, 7 Oct 1994 15:03:45 -0500
From: (Pete Resnick)
Subject: RFC 1123 (822) date formatter (C source code)

Content-Type: text/plain; charset="us-ascii"

This archive contains C source code and an associated resource file for
functions that convert between the ASCII version of Internet standard
format (RFC 822 and 1123) date strings and the Macintosh time format
(number of seconds since January 1, 1904). It is a little more lenient in
strings that it accepts, in that it will convert some time zone specifiers
that are not allowed in RFC 1123 (but are used by some broken mail
systems) instead of just ignoring them. But the strings it produces are
strict RFC 1123 date format strings.

I wrote this mainly as an exercise to try out some of the International
Utilities like StringToDate, StringToTime, ExtendedToString, and
StringToExtended. It is certainly not the fastest code to do this, but the
code size is pretty small, and it's a nice educational piece of code.

If you use this code in a project, please remember to give me proper
credit in the documentation or splash screen.

Pete Resnick -

Content-Type: application/mac-binhex40; name="RFC_1123_Date.sit"
Content-Disposition: attachment; filename="RFC_1123_Date.sit"