21 Clock() ---> プログラム開始時からのクロック・ティック数
27 See "Calculate performance" + nl
29 for x = 1 to 1000000 next
33 pair: 日付と時刻; ClosPerSecond()
36 ======================
44 clockspersecond() ---> 一秒あたりのクロック数
52 while clock() - t <= clockspersecond() end
60 Time() 関数はシステムの時刻を取得します。
66 See "Time : " + time()
81 Date() ---> 文字列は "日/月/西暦" 表記による日付表記です。
87 See "Date : " + date() # 日付 : 24/05/2015
91 pair: 日付と時刻; TimeList()
96 TimeList() 関数は日付と時刻の情報を表示します。
102 TimeList() ---> リストは時刻と日時の情報を有しています。
106 ============ =================================================
108 ============ =================================================
120 12 AM (午前) または PM (午後)
130 ============ =================================================
141 ## 05/24/15 09:58:38 日付と時刻
148 ## AM AM (午前) または PM (午後)
156 ## 東京 (標準時) タイムゾーン (結果は OS, 言語、地域に依存)
165 See "Day Name : " + TimeList()[2] # Sunday
171 See "Month Name : " + TimeList()[4] # May
174 pair: 日付と時刻; AddDays()
183 AddDays(cDate,nDays) ---> cDate から nDays 後の日付です。
190 see cDate + nl # 24/05/2015
191 cDate = adddays(cDate,10)
192 see cDate + nl # 03/06/2015
195 pair: 日付と時刻; DiffDays()
204 DiffDays(cDate1,cDate2) ---> 日数 (Date1 - Date2)
211 see cDate1 + nl # 24/05/2015
212 cDate2 = adddays(cDate1,10)
213 see cDate2 + nl # 03/06/2015
214 see "DiffDays = " + diffdays(cDate1,cDate2) + nl # -10
215 see "DiffDays = " + diffdays(cDate2,cDate1) + nl # 10
218 pair: 日付と時刻; EpochTime()
227 EpochTime( cDate, cTime ) ---> エポック秒
233 ###-------------------------------------------------------------
235 # 用例 --- EpochSec = EpochTime( Date(), Time() )
236 # 呼び出し形式: EpochSec = EpochTime( "15/07/2016", "10:15:30" )
237 # EpochSec = 1468577730
238 #---------------------------------------------------------------
240 Func EpochTime(Date, Time)
242 arrayDate = split(Date, "/")
243 arrayTime = split(Time, ":")
245 Year = arrayDate[3] ; Month = arrayDate[2] ; Day = arrayDate[1]
246 Hour = arrayTime[1] ; Minute = arrayTime[2] ; Second = arrayTime[3]
248 cDate1 = Day +"/"+ Month +"/"+ Year
249 cDate2 = "01/01/" + Year
250 DayOfYear = DiffDays( cDate1, cDate2)
255 tm_hour = Hour * 3600
256 tm_yday = DayOfYear * 86400
257 tm_year = Year - 1900
259 tm_year1 = ( tm_year - 70) * 31536000
260 tm_year2 = ( floor(( tm_year - 69) / 4 )) * 86400
261 tm_year3 = ( floor(( tm_year - 1) / 100 )) * 86400
262 tm_year4 = ( floor(( tm_year + 299) / 400 )) * 86400
265 EpochSec = tm_sec + tm_min + tm_hour + tm_yday + tm_year1 + tm_year2 - tm_year3 + tm_year4