local_time 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,21 +0,0 @@
1
- module "public API"
2
-
3
- test "strftime", ->
4
- datetime = "2013-11-12T12:13:00Z"
5
- time = new Date Date.parse datetime
6
- format = "%B %e, %Y %l:%M%P"
7
- results = LocalTime.strftime time, format
8
-
9
- ok results
10
-
11
- datetimeParsed = moment datetime
12
- localParsed = moment results, "MMMM D, YYYY h:mma"
13
-
14
- ok datetimeParsed.isValid()
15
- ok localParsed.isValid()
16
- equal datetimeParsed.toString(), localParsed.toString()
17
-
18
- test "relativeTimeAgo", ->
19
- time = moment().subtract("minutes", 42).toDate()
20
- results = LocalTime.relativeTimeAgo(time)
21
- equal results, "42 minutes ago"