package ptime
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=b0c3240dd9e777a5e60b5269eb2e312fc644d29ef55e257d2f2538c03bf62274173ed36e13858c44d2dbee8fe375c9c483e705706e4aa5b3b5c4609ca6324a5c
CHANGES.md.html
v1.2.0 2024-09-10 Zagreb
Fix fractional renderings of
Ptime.Span.pp
with leading zeros. For example 1.036s would render as 1.36s. This is a rendering bug in a function for human display, not a bug in the computations or conversion functions ofPtime
.Add
Ptime.weekday
type for naming the result of thePtime.weekday
function.Regularize naming structure. The
ptime.clock.os
library is deprecated. Useptime.clock
instead.Make the library
ptime.clock
exportptime
.
v1.1.0 2022-12-02 Zagreb
Ptime.of_rfc3339
timezone offset parsing. Be even more lenient in non-strict parsing mode: allowhhmm
andhh
timezone offsets. (strict ishh:mm
). Allows to parse an even larger subset of ISO 8601 than RFC 3339 (#31).Add
Ptime.{to,of}_year
. Less costly than extracting the first component ofPtime.to_date_time
. Useful for example to find out which DST rules a timestamp is subjected to for rendering.Add
?tz_offset_s
optional argument toPtime.{of,to}_date
(#32).Add
Ptime.weekday_num
. An integer is often more convenient than the enum value ofPtime.weekday
(#30).Add
Ptime.rfc3339_string_error
convenience function.Use the new
js_of_ocaml
METAocamlfind
standard to link JavaScript stubs (#28).No longer install interfaces in the
ptime.clock
package, this package is now empty.
v1.0.0 2022-02-16 La Forclaz
Change the
js_of_ocaml
strategy forPtime_clock
's JavaScript implementation. Primitives ofptime.clock.os
are now implemented in pure JavaScript and linked byjs_of_ocaml
. This means that theptime.clock.jsoo
library no longer exists, simply link againstptime.clock.os
instead. Thanks to Hugo Heuzard for suggesting and implementing this.Require OCaml >= 4.08
Correct a potential overflow in Ptime.Span.of_float_s (#26).
v0.8.6 2021-11-28 Zagreb
Require OCaml >= 4.03
Drop dependency on
result
compatibility package.Alter install structure.
ptime/{os,jsoo}
are now installed inptime/clock/{os,jsoo}
. Also aptime_clock.cm[t]i
is now installed inptime/clock/
. Theocamlfind
packages are unchanged except forptime.clock.os.top
which no longer exists.Handle
Pervasives
deprecation.Fix
Ptime.truncate
to always truncate down. Thanks to David Kaloper Meršinjak for the report & fix.Allow compiling with MSVC compiler. Thanks to Jonah Beckford for the patch.
v0.8.5 2019-05-02 La Forclaz (VS)
Make the package compatible with
js_of_ocaml
3.3.0's namespacing
v0.8.4 2018-07-26 Zagreb
Ptime_clock
: Windows support. Thanks to IndiscriminateCoding and David Allsopp for the contribution.Fix
Ptime.frac_s
on pre-epoch time stamps. The function computed a span of1s - f
instead off
on these. This function is not used internally so this only affects users of this function that apply it on pre-epoch time stamps (#12). Thanks to David Kaloper Meršinjak for the report.
v0.8.3 2017-02-05 La Forclaz (VS)
Fix package for -custom linking.
v0.8.2 2016-07-22 Zagreb
Add
?tz_offset_s
optional argument toPtime.weekday
. Thanks to Maxence Guesdon for suggesting.
v0.8.1 2015-07-14 Cambridge (UK)
Add
Ptime.v
andPtime.Span.v
to safely deal with trusted inputs. Thanks to Matt Gray for suggesting.Add
Ptime.weekday
, to help conversions to denormalized timestamp formats. Thanks to Romain Calascibetta for suggesting.Build depend on topkg.
Relicense from BSD3 to ISC.
v0.8.0 2015-12-24 Cambridge (UK)
First release. Thanks to Raphaël Proust for lodging support.