#date-time #time #timezone #date #clock #wall #representation

wall-clock

A representation of time as displayed on a wall clock, without date or time zone

4 releases

0.2.2 Apr 3, 2024
0.2.1 Apr 2, 2024
0.2.0 Apr 2, 2024
0.1.0 Apr 2, 2024

#3 in #wall

Download history 72/week @ 2024-07-15 163/week @ 2024-07-22 480/week @ 2024-07-29 127/week @ 2024-08-05 276/week @ 2024-08-12 129/week @ 2024-08-19 128/week @ 2024-08-26 177/week @ 2024-09-02 226/week @ 2024-09-09 24/week @ 2024-09-16 57/week @ 2024-09-23 43/week @ 2024-09-30 132/week @ 2024-10-07 105/week @ 2024-10-14 10/week @ 2024-10-21 3/week @ 2024-10-28

251 downloads per month

MIT license

13KB
211 lines

Wall Clock Time

ci codecov release docs

wall-clock provides a simple and very basic struct for repsenting time as one reads it off a clock on the wall, e.g. with no concept of date, or time zone.

Examples

Making a wall clock time:

use wall_clock::WallClockTime;
let wct = WallClockTime::new(15, 0, 0);

You can also use the time! macro to get a syntax resembling a literal:

use wall_clock::time;
let wct = time!(15:00:00);

Features

wall-clock ships with the following features:

  • diesel-pg: Enables interop with PostgreSQL TIME columns using Diesel.
  • serde: Enables serialization and desearialization with serde. (Enabled by default.)

Dependencies

~0.1–1MB
~19K SLoC