Commit Graph

236 Commits (e6580fefaaea0fd2446d654e3b5ac14cbea40e2b)

Author SHA1 Message Date
Delyan Angelov 5328dabad1
time: simplify some very commonly used t.format methods 2022-05-22 21:09:49 +03:00
Delyan Angelov a7afb2d1eb
time: remove `import math` dependency, by implementing a simpler version of mceil 2022-05-21 02:04:17 +03:00
David 'Epper' Marshall c28051020a
time: fix calculate_date_from_offset (#14399) 2022-05-15 10:55:24 +03:00
Daniel Däschle d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
David 'Epper' Marshall 26b81d68b5
time: update doc comments (#14359) 2022-05-11 16:55:19 +03:00
Delyan Angelov 084f2867b6
time: let time.parse_rfc3339('2015-01-06T15:47:32.080254511Z') succeed (dockerd timestamps, Go's RFC3339Nano). 2022-05-08 14:54:57 +03:00
David 'Epper' Marshall 91c1157810
time: relative update (#14240) 2022-05-01 10:47:05 +03:00
David 'Epper' Marshall a2338dbb7c
docs: document more `builtin` functions/methods (#14229) 2022-04-30 12:31:23 +03:00
David 'Epper' Marshall 881d0c04f1
time: add custom formatter (#14202) 2022-04-29 15:57:08 +03:00
Alexander Medvednikov d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Larpon 11ccf06441
time: add missing doc string to parse.v (#13933) 2022-04-05 13:21:37 +03:00
Cameron Katri d585fbea8a
time: implement Time.strftime(fmt string) as a wrapper for strftime(3) (#13898) 2022-04-02 18:33:37 +03:00
yuyi 6987f2c087
time: fix error for time.local() on windows (#13892) 2022-04-01 17:16:46 +03:00
Vincenzo Palazzo 02c80bd445
time: fix repetitive time.now().local().local().local() offsetting the time further and further (#13861) 2022-04-01 00:11:17 +03:00
Alexander Medvednikov 36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
Subhomoy Haldar 114a341f5f
rand: simplify rand.PRNG, move to optional types for error handling (#13570) 2022-02-23 12:36:14 +02:00
Tim Basel 9d0a5942ac
builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
jeffmikels a60b381d5e
docs: adding skeleton README.md files for all vlib modules (#13034) 2022-01-05 18:06:08 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
playX 2b9f993574
gg: add text rendering, keyboard event handling for JS and other fixes (#12932) 2021-12-22 12:26:52 +02:00
Miccah d07975335d
time: add Duration.str() (#12897)
* time: add str() method to Duration

* add Duration.str tests, move time.infinite to time.v, to be visible to the JS backend

Co-authored-by: Delyan Angelov <delian66@gmail.com>
2021-12-19 19:32:42 +02:00
Larpon 69fa87ad24
toml: add date and time checks (#12427) 2021-11-11 07:27:41 +02:00
Delyan Angelov 49ebba535e
time: implement `pub fn since(t Time) Duration` 2021-10-24 21:36:28 +03:00
playX 864d6eae6b
js: codegen & vlib fixes, replace the Game of Life CLI example (#12272) 2021-10-22 22:03:19 +03:00
Delyan Angelov ef0eaeee08
ci: fix broken js tests 2021-10-19 20:05:27 +03:00
Alexander Medvednikov 45534b512b time: move pure V function from time.c.v 2021-10-19 16:03:45 +03:00
playX d3887c1568
time: fix sys_mono_now for the JS backend (#12187) 2021-10-15 09:22:15 +03:00
Delyan Angelov 23e679475c
time: sanity check parsed date/times 2021-10-09 11:05:49 +03:00
Larpon 5541ec8670
vlib: add toml module + tests (#11964) 2021-09-24 21:13:52 +03:00
yuyi 108a01d65f
fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
Daniel Däschle b63ec8fbcf
checker: require `params` attribute to use struct as keyword arguments in function (#11135) 2021-09-14 00:05:30 +03:00
Delyan Angelov f5a22f15d9 time: fix `./v -o vcross -os cross cmd/v` on macos 2021-09-06 19:50:16 +03:00
JalonSolov b3c641f7d5
time: use `&C.time_t` instead of `&time_t` in C fn declaration (#11232) 2021-08-18 17:05:43 +03:00
playX 0121c8b4fd
v.gen.js: fix method calls and other codegen parts, rand module compiles (#11205) 2021-08-18 11:33:37 +03:00
Alexander Medvednikov eb1ac5b30d time: use i64 in unix() 2021-08-16 06:28:54 +03:00
wilesun 18be9e52be
log: avoid using string__plus memory leak (#11128) 2021-08-11 09:26:02 +03:00
playX 70124d2d23
js: time module: implement utc,now,local (#11138) 2021-08-11 09:22:53 +03:00
playX 8d6903a65a
time: move C backend specific code into .c.v files (#11125) 2021-08-10 14:34:53 +03:00
Delyan Angelov efa8dcf4d2
time: turn Time.unix to i64, so it can represent times before 1970-01-01, fix time operators, add more tests (#11050) 2021-08-04 13:12:02 +03:00
shadow 66bc8bc0cb
vlib: remove many deprecated functions (#10972) 2021-07-28 09:22:19 +03:00
Delyan Angelov 29f55bdf9b time: fix V compilation for solaris 2021-07-24 11:17:54 +03:00
Daniel Däschle ad3835b598
parser: deprecate short struct init (#10842) 2021-07-20 11:17:08 +03:00
Delyan Angelov 55eeb701a9
time: fix `time.parse_iso8601(2037-07-23)?.add_days(181).str() == "1901-12-13 17:31:44"` 2021-07-06 18:54:33 +03:00
Uwe Krüger 72358833e0
time: use `Duration(C.INT64_MAX)` as infinite (#10539) 2021-06-22 12:17:44 +03:00
Uwe Krüger 3f5aa5e634
sync: make `Semaphore.*wait()` robust against interrupts by signals (#10491) 2021-06-18 12:44:18 +03:00
Uwe Krüger 60c880a0cc
vlib: use `malloc_noscan()` where possible (#10465) 2021-06-15 14:47:11 +03:00
Enzo df2b688337
checker: cleanup type alias pascal case check (#10217) 2021-05-27 22:40:32 +03:00
Delyan Angelov f1174daabd
time: remove `err_invalid_8601 = error()` const, use a const string instead 2021-05-18 12:32:09 +03:00
Delyan Angelov 7c664de8aa time: fix macos job (building V with -cflags --Werror) 2021-04-05 22:32:33 +03:00
Delyan Angelov 291a88bc62
ci: fix some of `v test-cleancode` 4 2021-04-05 21:39:32 +03:00