Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Basic programming question

by davido (Cardinal)
on Jan 27, 2005 at 06:45 UTC ( #425486=note: print w/replies, xml ) Need Help??


in reply to Basic programming question

Both are in error, since PM starts at 12:00, mid-day.

Without additional context it's difficult to cast judgement on which approach is the lesser of two evils.


Dave

Replies are listed 'Best First'.
Re^2: Basic programming question
by Anonymous Monk on Jan 27, 2005 at 06:52 UTC
    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)

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://425486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2022-12-02 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?