Skip to content

Instantly share code, notes, and snippets.

@bdkosher
Created April 9, 2014 15:47
Show Gist options
  • Save bdkosher/10284999 to your computer and use it in GitHub Desktop.
Save bdkosher/10284999 to your computer and use it in GitHub Desktop.
String.format provides an easy way to get the day of the week of a given Date.
assert String.format('%tA', Date.parse('yyyy-MM-dd', '2013-02-04')) == 'Monday'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment