Determines if a time is in the AM.
IsAm = SRP_Time("IsAm", Time)
Returns
1 if the time is in the AM, 0 if it is in the PM.
Parameters
| Parameter | Description |
|---|---|
| Time | A time in OI internal format. (REQUIRED) |
Remarks
The "IsAm" service returns 1 if the time is in the AM or 0 if it is in the PM. If an OI time represents 12:41:08pm, this service would return 0. If the given time not valid, 0 is returned. Therefore, it might be necessary to Validate the time if you want to ensure no false negatives.
Examples
// Is the current hour in the AM?
IsAm = SRP_Time("IsAm", Time())
// Is the the current hour in UTC in the AM?
IsAm = SRP_Time("IsAm", SRP_Time("Now", 1))
// Is this hard coded time in the AM?
Hour = SRP_Time("IsAm", 56013)
// Is the string containing a time in the AM?
Time = SRP_Time("Parse", "12:41:08pm", "h:mm:sstt")
IsAm = SRP_Time("IsAm", Time)