Delyan Angelov
a08ea74167
time: fix timezone test on windows
Graphics CI / gg-regressions (push) Waiting to run
vlib modules CI / build-module-docs (push) Waiting to run
Shy and PV CI / v-compiles-puzzle-vibes (push) Waiting to run
sdl CI / v-compiles-sdl-examples (push) Waiting to run
Time CI / time-linux (push) Waiting to run
Time CI / time-macos (push) Waiting to run
Time CI / time-windows (push) Waiting to run
toml CI / toml-module-pass-external-test-suites (push) Waiting to run
Tools CI / tools-linux (clang) (push) Waiting to run
Tools CI / tools-linux (gcc) (push) Waiting to run
Tools CI / tools-linux (tcc) (push) Waiting to run
Tools CI / tools-macos (clang) (push) Waiting to run
Tools CI / tools-windows (gcc) (push) Waiting to run
Tools CI / tools-windows (msvc) (push) Waiting to run
Tools CI / tools-windows (tcc) (push) Waiting to run
Tools CI / tools-docker-ubuntu-musl (push) Waiting to run
vab CI / vab-compiles-v-examples (push) Waiting to run
vab CI / v-compiles-os-android (push) Waiting to run
2025-07-27 15:56:36 +03:00
kbkpbot
dc2a7b2b7c
time: fix custom_format panic ( fix #24977 ) ( #24987 )
2025-07-27 15:46:56 +03:00
kbkpbot
57a45bc353
time: add .week_of_year() method for time.Time instances ( #23838 )
2025-03-02 10:04:59 +02:00
Hitalo Souza
d7d88b9f0f
log,time: improve performance for writing a line to a log, add Time.format_rfc3339_micro/0 ( #22662 )
2024-10-27 12:00:16 +02:00
yuyi
c51d30bf53
fmt: fix alignment of struct init fields ( #22025 )
2024-08-11 09:11:24 +03:00
yuyi
19f080ffb8
all: change single blank comment to blank line ( #22016 )
2024-08-09 14:55:58 +03:00
Ivan Vatlin
c0bb9605c0
time: d
,c
,dd
,ddd
,dddd
pattern support for parse_format() ( #22003 )
2024-08-09 13:27:15 +03:00
Turiiya
dfc0c91295
checker: turn warnings for private fields into errors ( #21296 )
2024-06-09 10:19:52 +03:00
Delyan Angelov
dbc6b50cda
vlib: make ./v -Wimpure-v -W test vlib/
pass on Linux ( #21554 )
2024-05-23 16:21:01 +03:00
Turiiya
1363cc85fd
time: update unix time acces, fix issues related to deviating unix times ( #21293 )
2024-04-17 00:33:37 +03:00
Hitalo Souza
d5370bd220
time: microoptimise the Time formating methods (use custom number->string conversion, instead of string interpolation) ( #20917 )
2024-02-28 11:55:33 +02:00
Hitalo Souza
8c9003fbd3
time: add a tm_gmtoff field to C.tm
(a BSD and GNU extension) ( #20907 )
2024-02-26 11:49:12 +02:00
Ivan Vatlin
c790afabdc
time: add MMM
support for parse_format() ( #19284 )
2023-09-06 18:46:57 +03:00
Delyan Angelov
286d39706b
time: add a format_rfc3339_nano() method to time.Time
2023-08-08 08:35:05 +03:00
Delyan Angelov
b9a523cefd
time: store time with nanosecond resolution in time.Time, deprecate Time.microsecond, add utility methods and tests ( #19062 )
2023-08-05 23:41:23 +03:00
werkzeug
a3449098a9
time: fix losing of the .is_local value after adding duration ( #18938 )
2023-07-22 07:01:11 +03:00
acimnotes
790afbce94
time: add new method year_day and the tests for it ( #18107 )
2023-05-12 09:27:20 +03:00
Swastik Baranwal
93b7cc4888
cgen: allow using of original operation if alias is number and no custom method is defined ( #17718 )
2023-03-21 11:39:58 +02:00
Delyan Angelov
94098eef79
time: use UTC time in Time.format_rfc3339, make test more robust
2022-12-11 10:36:29 +02:00
Delyan Angelov
2ecb892985
time: add Time.format_rfc3339() method
2022-12-11 10:23:05 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' ( #16428 )
2022-11-15 16:53:13 +03:00
Delyan Angelov
0cc0e87051
time: use linux_utc() and linux_now() on freebsd too (more precise, and fixes time_test.v)
2022-09-01 09:54:20 +00:00
David 'Epper' Marshall
c28051020a
time: fix calculate_date_from_offset ( #14399 )
2022-05-15 10:55:24 +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
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
Delyan Angelov
49ebba535e
time: implement pub fn since(t Time) Duration
2021-10-24 21:36:28 +03:00
yuyi
108a01d65f
fmt: fix unnecessary line break in array init ( fix #11448 ) ( #11562 )
2021-09-21 16:20:09 +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
Ekopalypse
1b7fd2cf00
time: fix time offset ( #9449 )
2021-03-27 17:34:34 +02:00
Alexander Medvednikov
3a2d696fac
time: time.wait() => time.sleep()
2021-02-27 20:41:06 +03:00
zakuro
ac4791045f
time: consolidate the different sleep functions into time.wait(Duration) ( #8853 )
2021-02-21 17:05:03 +02:00
Lukas Neubert
75d85403a6
fmt: better ternary concat wrapping ( #8379 )
2021-01-28 11:23:48 +01:00
Delyan Angelov
dbaccd4272
vfmt: shorten main.const_name
to just const_name
2021-01-25 20:57:33 +02:00
Delyan Angelov
728344ff65
ci: fix v test-cleancode
2021-01-25 12:55:01 +02:00
Lukas Neubert
8b61891348
fmt: smarter if condition wrapping ( #8201 )
2021-01-23 10:33:22 +02:00
zakuro
c639dd03d0
time: move - operator to operator.v ( #7433 )
2020-12-21 09:28:00 +01:00
zakuro
6a74058190
time: make parse_iso8601 support a date only format ( #7277 )
2020-12-16 13:10:02 +02:00
Takahiro Yaota
eb48208599
time: Time.add ( #7262 )
2020-12-12 04:22:30 +01:00
Takahiro Yaota
a2f7e0636d
time: -
operator overloading ( #7259 )
2020-12-11 06:54:23 +01:00
Delyan Angelov
0c192cfd64
tests: fix warnings when doing ./v -W -progress -check-syntax test-fixed
2020-10-26 14:41:57 +02:00
penguindark
7d52d612ce
rand: add rand.ulid() ( #5979 )
...
* removed debug println
* added newline to the end of the file
* time: add .unix_time_milli() method; rand,time: add tests
* rand: add more ulid tests; move tests to a separate file random_identifiers_test.v
* run vfmt over vlib/rand/random_identifiers_test.v
* speed up time.unix_time_milli
* simplify and speedup time.unix_time/0 and time.new_time/1
* update comment about rand.ulid()
* fix terminating 0 off by 1 issue in rand.ulid()
* optimize time.new_time()
* restore the master version of vlib/time/parse.v
* make test_unix_time more robust
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-07-26 13:10:56 +03:00
Delyan Angelov
8f23accc4e
time: add .format_ss_milli and .format_ss_micro methods
2020-07-21 11:58:33 +03:00
Tomas Hellström
2dc547a45c
time: fix iso8601 parser and utc time
2020-06-10 11:14:55 +02:00
Tomas Hellström
9c8769503f
time: add microsecond precision to Time struct
2020-06-07 16:19:09 +03:00
Uwe Krüger
fd4d28b7b6
tests: update for stricter type checks
2020-05-24 21:07:32 +02:00
spaceface777
ef8c1203b4
cleanup: replace C for loops with range
2020-02-24 17:55:16 +01:00
Alexey
65744207fc
time: reorganize module
2020-02-06 14:19:44 +01:00
Alexey
91e181b14a
time: return optional value in parse
and parse_iso
functions
2020-02-06 10:22:00 +01:00
Alexey
a61c9c617d
time: use _mkgmtime
and timegm
to calculate unix time
2020-02-05 06:13:11 +01:00
vitalyster
21b54723e4
time: fix timezone
2020-02-04 12:17:04 +01:00