Skip to content

Instantly share code, notes, and snippets.

@nisbus
Created February 27, 2013 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nisbus/5048038 to your computer and use it in GitHub Desktop.
Save nisbus/5048038 to your computer and use it in GitHub Desktop.
month(<<"J",_/binary>>) ->
1;
month(<<"F",_/binary>>) ->
2;
month(<<"Apr",_>>) ->
4;
month(<<"Mar",_>>) ->
5;
month(<<"M",_/binary>>) ->
3;
month(<<"J",_:1/binary,"n",_/binary>>) ->
6;
month(<<"J",_:1/binary,"l",_/binary>>) ->
7;
month(<<_:1/binary,"g",_/binary>>) ->
8;
month(<<"S",_/binary>>) ->
9;
month(<<"O",_/binary>>) ->
10;
month(<<"N",_/binary>>) ->
11;
month(<<"D",_/binary>>) ->
12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment