Skip to content

Commit

Permalink
Date: Turns out datesaurus completely unnecessary, whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
darkerbit authored and zephyrtronium committed Dec 23, 2019
1 parent dfabc12 commit d246662
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions date.go
Expand Up @@ -5,7 +5,6 @@ import (
"math"
"time"

"github.com/darkerbit/datesaurus"
"gitlab.com/variadico/lctime"
)

Expand Down Expand Up @@ -238,7 +237,8 @@ func DateFromString(vm *VM, target, locals *Object, msg *Message) *Object {
return vm.Stop(err, stop)
}

var longForm = datesaurus.Get(format)
longDate := time.Date(2006, time.January, 2, 15, 4, 5, 0, time.FixedZone("MST", -7*60*60))
longForm := lctime.Strftime(format, longDate)

v, r := time.Parse(longForm, str)
if r != nil {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Expand Up @@ -3,7 +3,6 @@ module github.com/zephyrtronium/iolang
go 1.13

require (
github.com/darkerbit/datesaurus v0.1.0
github.com/zephyrtronium/contains v0.0.0-20190813150354-f7df53f08000
gitlab.com/variadico/lctime v0.0.0-20190211022338-49aae8a53d11
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe
Expand Down
2 changes: 0 additions & 2 deletions go.sum
@@ -1,5 +1,3 @@
github.com/darkerbit/datesaurus v0.1.0 h1:a6pMdUcJPBxPZ40R2tvxkDRZYZU4ogTEbCc3vtT7lIE=
github.com/darkerbit/datesaurus v0.1.0/go.mod h1:0GdnR5gE0cFARfpQM85K50FHyeOBfnb1B7nt3anqqXo=
github.com/zephyrtronium/contains v0.0.0-20190813150354-f7df53f08000 h1:rsL4vYsl1EVDklYnVDq2etRQv7jZtFu2gkv4OzKKFbo=
github.com/zephyrtronium/contains v0.0.0-20190813150354-f7df53f08000/go.mod h1:9VfULMvEEtBLQ93TyMwEFa2rMZj232ZMs7HA/dx31Eg=
gitlab.com/variadico/lctime v0.0.0-20190211022338-49aae8a53d11 h1:Ly1b+G8N/HhmtygI9E+LkVZ3LitOpHHyVKbBORfOd7o=
Expand Down

0 comments on commit d246662

Please sign in to comment.