hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit f64777909742b3be65846658c33b7b61e4cf8033
parent ac9b2c35c09d555e09dbd81c5ed95bdfa14313ba
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 21 Jun 2022 00:45:36 +0200

datetime: fix parsing nanoseconds

Per [[datetime::format]] nanoseconds are between 0 and 999999999

Diffstat:
Mdatetime/parse.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datetime/parse.ha b/datetime/parse.ha @@ -92,7 +92,7 @@ export fn parse(build: *builder, layout: str, s: str) (void | invalid) = { get_max_n_digits(&s_iter, 2)?, 0, 59); case 'N' => build.nsec = clamp_int( - get_max_n_digits(&s_iter, 3)?, 0, 999); + get_max_n_digits(&s_iter, 9)?, 0, 999999999); case 'p' => if (build.hour is void) { // We can't change the hour's am/pm because we