MeridianMERIDIAN

24-Hour Time (HH:MM)

datetime.time.hm_24h

Hours and minutes only, no seconds. Common in schedules, timetables, and user-facing applications.

Worked samples

DuckDB 1.5.5 · finetype 0.6.64

ValueAs TIME
10:3010:30:00
23:5923:59:00
00:0000:00:00
%H
hour, 24-hour clock
%M
minutes

Shape

Pattern
^\d{2}:\d{2}$
ValueLengthShape
10:305matches
23:595matches
00:005matches
10:34rejected: one character short

Background

Origin

On the 24-hour clock, a time of day is written in the form hh:mm, for example 01:23.[1] The colon is the most commonly used separator between hours, minutes and seconds on the 24-hour clock.[1] On the 24-hour clock, a leading zero is added for numbers under 10, but it is optional for the hours.[1]

The first edition of the ISO 8601 standard was published as ISO 8601:1988 in June 1988.[2] ISO 8601 lets the seconds be omitted for brevity at the cost of precision, giving T[hh]:[mm] in the extended format.[2] RFC 3339 defines partial-time as a two-digit hour, a colon, a two-digit minute, a colon and a two-digit second.[3]

Use

The value of an HTML time input is always in 24-hour format with leading zeros, HH:mm, regardless of the input format shown to the user.[4] An HTML time input's step defaults to 60 seconds, and with that default most browser time controls show hours and minutes but not seconds.[4] A web form's time input is submitted as name=HH%3Amm, or name=HH%3Amm%3Ass if seconds are included.[4]

OpenStreetMap's opening_hours key writes hours as a 2-digit number in 24-hour format, with no am/pm, and minutes as a 2-digit number.[5] OpenStreetMap's opening_hours syntax allows extended hours past midnight, so Mo 20:00-26:00 means open Monday from 20:00 until 2:00 the next morning.[5] The GTFS transit feed specification writes times as HH:MM:SS and records times after midnight on the service day as values greater than 24:00:00.[6] Some bus and train timetables show 00:00 as a departure time and 24:00 as an arrival time.[1]

Style guides and military communication regulations in some English-speaking countries discourage 24:00 and recommend times near midnight be reported as 23:59 or 00:01 instead.[1] In the past, some European countries used the dot on the line as the separator in 24-hour times.[1] A value like 10.30 in an older European file may be a time of day rather than a decimal, so read the column header and neighbouring values before treating it as a number. (Meridian's view)

Detection notes

NEW in v2.

Use it

CLI · DuckDB
$ finetype infer -i "10:30" --mode column
→ datetime.time.hm_24h

SELECT ft_infer('10:30');
-- → 'datetime.time.hm_24h'
Cast expression
strptime({col}, '%H:%M')::TIME
-- Format: %H:%M

Schema

https://meridian.online/schemas/datetime.time.hm_24h · Frictionless type time · %H:%M

finetype taxonomy datetime.time.hm_24h -o json-schema

Type Registry