Skip to content

Commit

Permalink
feat(stdlibs/time): add DateTime, DateOnly and TimeOnly (#2240)
Browse files Browse the repository at this point in the history
This just adds a few missing time format constants to the time gno
module.
  • Loading branch information
deelawn authored May 30, 2024
1 parent 4940836 commit 0ee8bdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/gno.land/r/demo/boards/z_4_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func main() {
// "Escaped": true,
// "ObjectID": "336074805fc853987abe6f7fe3ad97a6a6f3077a:2"
// },
// "Index": "189",
// "Index": "192",
// "TV": null
// }
// }
Expand Down Expand Up @@ -540,7 +540,7 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "25ffc45509708ca0ae17271cb4c3a1dfb367b965",
// "Hash": "1dd77a196db00a4d1a3471539279df79f6ae950e",
// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:115"
// }
// },
Expand Down Expand Up @@ -846,7 +846,7 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "a8e67b9881af89ca2ec2f05778bf7528a54a5833",
// "Hash": "6e8ecb1c773e0e34ba560dcff1b2dee0bc2e5660",
// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:82"
// }
// },
Expand All @@ -864,7 +864,7 @@ func main() {
// },
// "V": {
// "@type": "/gno.RefValue",
// "Hash": "d8ae14a4620e3c6dedabd76cd0c5d7e3c205d647",
// "Hash": "796da27e11e6d75db3e0e8f9d633f4559f1b1a82",
// "ObjectID": "f6dbf411da22e67d74cd7ddba6a76cd7e14a4822:83"
// }
// },
Expand Down
3 changes: 3 additions & 0 deletions gnovm/stdlibs/time/format.gno
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ const (
StampMilli = "Jan _2 15:04:05.000"
StampMicro = "Jan _2 15:04:05.000000"
StampNano = "Jan _2 15:04:05.000000000"
DateTime = "2006-01-02 15:04:05"
DateOnly = "2006-01-02"
TimeOnly = "15:04:05"
)

const (
Expand Down

0 comments on commit 0ee8bdc

Please sign in to comment.