BOM: change datetimepickers to datepickers

This commit is contained in:
Rob H
2014-04-10 10:51:55 +10:00
parent c5d5f5a9e6
commit 645b6d5a8f
5 changed files with 32 additions and 12 deletions

View File

@@ -609,8 +609,10 @@ describe "Auxiliary functions", ->
expect(twoDigitNumber(1)).toEqual "01"
expect(twoDigitNumber(9)).toEqual "09"
describe "formatting a date", ->
it "returns a date formatted as yyyy-mm-dd hh-MM:ss", ->
describe "formatting dates and times", ->
date = null
beforeEach ->
date = new Date
date.setYear(2010)
date.setMonth(5) # Zero indexed, so 5 is June
@@ -618,4 +620,9 @@ describe "Auxiliary functions", ->
date.setHours(5)
date.setMinutes(10)
date.setSeconds(30)
expect(formatDate(date)).toEqual "2010-06-15 05:10:30"
it "returns a date formatted as yyyy-mm-dd", ->
expect(formatDate(date)).toEqual "2010-06-15"
it "returns a time formatted as hh-MM:ss", ->
expect(formatTime(date)).toEqual "05:10:30"