Skip to content

Instantly share code, notes, and snippets.

@artefactop
Created May 21, 2013 18:04

Revisions

  1. pepeyuilop created this gist May 21, 2013.
    4 changes: 4 additions & 0 deletions calendar_iso8601.erl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    date_to_integer_iso8601({date,{Y,M,D}}) ->
    datetime_to_integer_iso8601({datetime,{{Y,M,D},{0,0,0}}}).
    datetime_to_integer_iso8601({datetime,{{Y,M,D},{H,Min,S}}}) ->
    Y * 10000000000 + M * 100000000 + D * 1000000 + H * 10000 + Min * 100 + S.