Alexander Medvednikov
7da1afa140
all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests
2020-10-15 12:32:28 +02:00
spaceface777
b44620d065
time: use linux high-precision timers on Android as well ( #6476 )
2020-09-25 18:02:02 +03:00
Daniel Däschle
abc98c273c
parser: require assign on type alias ( #6477 )
2020-09-25 12:02:32 +02:00
Delyan Angelov
e2e683199d
time: do not panic on time.new_time({unix: 1608854400}).str()
2020-09-16 22:14:02 +03:00
Uwe Krüger
c3cdfa1c96
sync/channels: provide `try_push(), try_pop() as public methods ( #6101 )
2020-08-10 18:06:42 +02:00
Alexander Medvednikov
adafd24819
gen: auto_str_methods.v
2020-08-01 16:36:12 +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
Delyan Angelov
78e1127d99
cgen: treat the main module like any other v module
2020-07-01 00:53:53 +02:00
Alexander Medvednikov
7750ce5f60
time: fix relative()
2020-06-12 15:28:28 +02:00
Alexander Medvednikov
72fdb09e46
time: relative_short(); fmt: handle $vweb.html()
2020-06-11 20:26:49 +02: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
076089d3c5
checker: apply stricter type checks to function args and return types
2020-06-01 21:15:59 +02:00
Uwe Krüger
013fdb8a4b
checker: restrict numeric promotions to cases where no data is lost
2020-05-27 05:42:48 +02:00
Uwe Krüger
2635be511f
all: re-apply C++ support
2020-05-18 21:38:06 +02:00
Alexander Medvednikov
07a78b2843
Revert "all: C++ compiler support"
...
This reverts commit 9a237c3e82
.
2020-05-18 17:05:48 +02:00
Uwe Krüger
9a237c3e82
all: C++ compiler support
2020-05-18 15:51:36 +02:00
pancake
b5bf0eeac5
time: add .no_delimiter format option
2020-05-08 21:23:26 +03:00
Major Taylor
25f2b171fc
time: Timer -> StopWatch; time.Duration
2020-04-24 07:33:25 +02:00
Daniel Däschle
b0dacef32b
time: change unix timestamp to u64
2020-04-07 03:35:47 +02:00
yuyi
8ba6e45d83
time: fix unix_time
2020-04-04 12:10:56 +02:00
joe-conigliaro
d048bf66b0
cgen: optimize/generalize typ method
2020-04-01 00:18:25 +11:00
Alexander Medvednikov
473d9fef55
checker: do not allow extra () in if conditions
2020-03-27 14:57:19 +01:00
yuyi
2efc37947d
time: calc_unix => unix_time
2020-03-22 19:43:59 +01:00
Alexander Medvednikov
9034b1fd08
v2: match cgen; use `as` for casting
2020-02-07 14:50:52 +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
Alexander Medvednikov
80daaff874
v2: scopes, or, in, hex
2020-02-04 17:44:39 +01:00
vitalyster
21b54723e4
time: fix timezone
2020-02-04 12:17:04 +01:00
Shun Sakai
c8c43a2475
update copyright year
2020-01-23 21:04:46 +01:00
nsauk
84438c0139
time: add str()
2020-01-20 15:06:15 +01:00
Delyan Angelov
6d30697d9b
time: move time.random() to time.misc module
...
avoids importing rand to programs that do not need pseudo random generation).
2020-01-07 12:58:24 +01:00
Alexander Medvednikov
2f8969c604
time: Windows fix
2020-01-01 12:01:03 +01:00
Alexander Medvednikov
87cff0386c
time: gmt offset; macos syscalls
2020-01-01 10:09:19 +01:00
lutherwenxu
286a0a1371
time: rewrite unix() function
2019-12-31 17:11:47 +01:00
yatsen1
137a473bb7
add time.parse_iso
2019-12-23 13:36:51 +03:00
yatsen1
d03f0ec294
fix time.parse()
2019-12-23 13:25:44 +03:00
Alexander Medvednikov
6210984c97
run vfmt
2019-12-20 02:09:56 +03:00
Alexander Medvednikov
f51784ee01
remove unnecessary casts everywhere
2019-12-07 15:51:00 +03:00
Alexander Medvednikov
b2b34e18e4
use the new &C.Foo(0) cast
2019-12-04 12:19:32 +03:00
Alexander Medvednikov
81d4f66fbb
string: make `index()` return `?int` instead of `int`/-1
2019-11-30 13:21:21 +03:00
Alexander Medvednikov
b38283dcf1
string: make left/right private
2019-11-30 12:06:17 +03:00
kevin70g
5536eb581c
time: C.timeval struct member definitions fix
2019-11-19 18:28:29 +03:00
Nicolas Sauzede
1dadf9d966
fix Windows warnings
2019-11-16 02:30:50 +03:00
Alexander Medvednikov
ffa6bcfff5
vfmt: handle comments
2019-11-13 11:54:22 +03:00
Alexander Medvednikov
f30d0ce667
parser: fix a bug with complex ref fn args
2019-11-11 04:56:13 +03:00
Enrico Lefass
a691cc857e
time: add new public functions for formatting
2019-11-01 02:13:03 +03:00
joe-conigliaro
59378dce46
compiler/vlib: replace substr/left/right with `[start..end]` everywhere
2019-10-27 10:03:15 +03:00