#date-time #date

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

#188 in #date

Download history 8/week @ 2025-08-17 44/week @ 2025-08-24 69/week @ 2025-08-31 69/week @ 2025-09-07 64/week @ 2025-09-14 50/week @ 2025-09-21 43/week @ 2025-09-28 53/week @ 2025-10-05 77/week @ 2025-10-12 115/week @ 2025-10-19 99/week @ 2025-10-26 58/week @ 2025-11-02 112/week @ 2025-11-09 163/week @ 2025-11-16 146/week @ 2025-11-23 157/week @ 2025-11-30

578 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.2–1.2MB
~24K SLoC