http://qs1969.pair.com?node_id=425488


in reply to Re: Basic programming question
in thread Basic programming question

That's debatable ;) I've seen arguments each way. Here's one from greenwichmeantime.com:

AM and PM start immediately after Midnight and Noon (Midday) respectively.

This means that 00:00 AM or 00:00 PM (or 12:00 AM and 12:00 PM) have no meaning.

Every day starts precisely at midnight and AM starts immediately after that point in time e.g. 00:00:01 AM (see also leap seconds)

To avoid confusion timetables, when scheduling around midnight, prefer to use either 23:59 or 00:01 to avoid confusion as to which day is being referred to.

It is after Noon that PM starts e.g. 00:00:01 PM (12:00:01)

Replies are listed 'Best First'.
Re^3: Basic programming question
by davido (Cardinal) on Jan 27, 2005 at 07:01 UTC

    That may be, but j.goor is testing to see if the hour is greater than 12. If the hour is greater than 12, it's either 1:00pm or 1300, which is just about a full hour past the AM/PM meridian.

    If the script is using $hour to mean hours and decimal hours, that sort of thing is not obvious in the snippet provided. What it says is that it is looking at hours.


    Dave