Skip to content

Commit

Permalink
Various bug fixes and changes
Browse files Browse the repository at this point in the history
parse/1 now accepts dates with Days in them:
* Sat, 1st Jan 2011
* Friday 2nd Mar 1314

No attempt is made to verify the day of the week it is silently discarded
A comma is also treated as a delimiter/whitespace and silently discarded

parse/1 accepts dates decorated by timezone information:
* Sat, 1st Jan 2011 GTM
* Sat, 1st Jan 2011 DST
* Sat, 1st Jan 2011 UTC

Again no attempt is made to adjust times the TZ info is silently discarded

Some minor fixes, and a dialyzer warning removed as well
  • Loading branch information
hypernumbers committed May 16, 2011
1 parent c0e740a commit f59cacd
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 114 deletions.
19 changes: 19 additions & 0 deletions README
@@ -0,0 +1,19 @@
Format Dates In Erlang
----------------------

Original source code by Dale Harvey licensed
under the DWTFYW License

Changes by Gordon Guthrie added under the
Abbie Hoffman 'Steal This Book' License

This module formats erlang dates in the form
{{Year, Month, Day}, {Hour, Minute, Second}}
to printable strings, using (almost) equivalent
formatting rules as http://uk.php.net/date

erlang has no concept of timezone so the following
formats are not implemented: B e I O P T Z
formats c and r will also differ slightly

See unit tests in the source code for examples

0 comments on commit f59cacd

Please sign in to comment.