liveBook · Manning

Struct tm

struct tm is a C standard library structure type representing broken-down calendar-time components such as seconds, minutes, days, months, and years.

How 2 Manning books explain it

Modern C

struct tm is the C standard library structure type for decomposed calendar-time components such as seconds, days, months, and years.

How it is used
Represents calendar dates as named components for initialization, member access, and time-library conversion.
How deep it goes
Works through designated initialization, member counting rules, omitted-member defaults, consistency, and mktime normalization.
Examples
Uses a 3 April 2019 initializer and a leap-year-aware function that computes tm_yday.
What you can do after
Operate/configure it with designated initializers and mktime to construct and normalize calendar-time values.

Read how Modern C explains struct tm →

Modern C, Third Edition

struct tm is the C standard-library structure type for representing broken-down calendar time components such as seconds, days, months, and years.

How it is used
Represents human-oriented calendar times and supplies structured fields for date arithmetic, conversion, and formatting.
How deep it goes
Defines members, encodings, initialization, consistency, and mktime normalization, but does not develop complete time-zone or formatting behavior.
Examples
Uses a 2019 date initializer, member-based year printing, and a day-of-year calculation that accounts for leap years.
What you can do after
Apply it via <time.h> to construct, inspect, normalize, convert, and format calendar-time values.

Read how Modern C, Third Edition explains struct tm →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.