|
Check whether the current time (specified time) has arrived.
syntax
IsCurrentTime(
year,
month,
day,
hour,
min,
sec
[,targetTime]
)
Parameters
year
|
|
Type:
|
Number
|
|
The year to compare. -1 means every year.
|
month
|
|
Type:
|
Number
|
|
Month to compare (1-12). -1 means every month.
|
day
|
|
Type:
|
Number
|
|
The day to compare (0-31). -1 means every day. 32 means the end of the month.
If you want to specify a day of the week, add the day of the week to be compared to 128.
1-Sunday 2-Monday 4-Tuesday 8-Wednesday 16-Thursday
32-Friday 64-Saturday
Example: Saturday
128 + 64
Example: Monday to Friday
128 + 1 + 2 + 4 + 8 + 16 + 32
|
hour
|
|
Type:
|
Number
|
|
The hour to compare (0-23). -1 means every hour.
|
min
|
|
Type:
|
Number
|
|
Minute to compare (0-59). -1 means every minute.
|
sec
|
|
Type:
|
Number
|
|
The second to compare (0-59). -1 means every second.
|
targetTime
|
|
Type:
|
time
|
|
The time to compare. If omitted, it will compare with the current time.
|
Return Value
|
|
Type:
|
Boolean
|
|
Whether the current time (specified time) has arrived.
|
Explanation
Checks whether the current time (specified time) has arrived.
|
Example
Whether the current time is 2004/1/1
|
IsCurrentTime(2004, 1, 1, -1, -1, -1);
|
Is the current time 12 o'clock?
|
IsCurrentTime(-1, -1, -1, 12, -1, -1);
|
Is the current time 12:00 on the last day of the month?
|
IsCurrentTime(-1, -1, 32, 12, -1, -1);
|
Is the current time 12:00 on Monday through Friday?
|
IsCurrentTime(-1, -1, 128 + 1 + 2 + 4 + 8 + 16 + 32, 12, -1, -1);
|
|
Supported
reference
GetTickTime
GetTickTimeSpan
GetClientTime
IsCurrentTime
GetRelativeTime
GetYear
GetMonth
GetDay
GetHour
GetMinute
GetSecond
GetMilliseconds
GetDayOfYear
GetDayOfWeek
|