summaryrefslogtreecommitdiff
path: root/lib/date
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2018-01-27 12:22:19 -0800
committerOri Bernstein <ori@markovcorp.com>2018-01-27 12:23:36 -0800
commit4c94aae21c2c2aec19d4fd5871cfe92bc09303a7 (patch)
treeb7c773a2274cb3b3ee46d9e90d54a3b6c4ddce37 /lib/date
parentdbe9ae0f9dbed30d40952261384b4673766d83ca (diff)
downloadmc-4c94aae21c2c2aec19d4fd5871cfe92bc09303a7.tar.gz
Remove std.sleq
We have std.eq. We still export a generic sleq for compatibility, but we don't need it or want it.
Diffstat (limited to 'lib/date')
-rw-r--r--lib/date/parse.myr10
-rw-r--r--lib/date/test/fmt.myr2
-rw-r--r--lib/date/test/parse.myr2
-rw-r--r--lib/date/zoneinfo+posixy.myr4
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/date/parse.myr b/lib/date/parse.myr
index 398dbae..a1df3f9 100644
--- a/lib/date/parse.myr
+++ b/lib/date/parse.myr
@@ -182,9 +182,9 @@ const tzoffset = {dst, s, err
err# = `std.Some `Badzone s
-> ""
;;
- if std.sleq(s[:1], "-")
+ if std.eq(s[:1], "-")
sgn = -1
- elif std.sleq(s[:1], "+")
+ elif std.eq(s[:1], "+")
sgn = 1
else
err# = `std.Some `Badzone s
@@ -216,7 +216,7 @@ const tzstring = {d, s, err
const matchstr = {s, str, err
- if s.len <= str.len || !std.sleq(s[:str.len], str)
+ if s.len <= str.len || !std.eq(s[:str.len], str)
err# = `std.Some `Badchar
-> s
;;
@@ -228,10 +228,10 @@ const matchampm = {d, s, am, err
err# = `std.Some `Badampm
-> s
;;
- if std.sleq(s[:2], "am") || std.sleq(s[:2], "AM")
+ if std.eq(s[:2], "am") || std.eq(s[:2], "AM")
am# = `std.Some true
-> s[2:]
- elif std.sleq(s[:2], "pm") || std.sleq(s[:2], "PM")
+ elif std.eq(s[:2], "pm") || std.eq(s[:2], "PM")
am# = `std.Some false
-> s[2:]
else
diff --git a/lib/date/test/fmt.myr b/lib/date/test/fmt.myr
index 45d845a..ba90f56 100644
--- a/lib/date/test/fmt.myr
+++ b/lib/date/test/fmt.myr
@@ -88,7 +88,7 @@ const main = {
}
const eq = {expected, actual
- if !std.sleq(expected, actual)
+ if !std.eq(expected, actual)
std.fatal("expected date {}, got {}\n", expected, actual)
;;
}
diff --git a/lib/date/test/parse.myr b/lib/date/test/parse.myr
index dc34707..f910b27 100644
--- a/lib/date/test/parse.myr
+++ b/lib/date/test/parse.myr
@@ -49,7 +49,7 @@ const main = {
}
const eq = {actual, expected
- if !std.sleq(expected, actual)
+ if !std.eq(expected, actual)
std.fatal("expected date {}, got {}\n", expected, actual)
;;
}
diff --git a/lib/date/zoneinfo+posixy.myr b/lib/date/zoneinfo+posixy.myr
index 33edd03..e2b8f6c 100644
--- a/lib/date/zoneinfo+posixy.myr
+++ b/lib/date/zoneinfo+posixy.myr
@@ -50,9 +50,9 @@ const findtzoff = {tz, tm -> std.option(date.duration)
zone = z
| `std.None:
/* load zone */
- if std.sleq(tz, "") || std.sleq(tz, "UTC")
+ if std.eq(tz, "") || std.eq(tz, "UTC")
-> `std.Some 0
- elif std.sleq(tz, "local")
+ elif std.eq(tz, "local")
path = std.sldup("/etc/localtime")
else
path = ""