函数:isDay 日期判断

函数名称:日期判断

函数功能:判断当前日期是否为指定日期

函数方法

flag = isDay(dayTable)

参数 类型 必填 说明
dayTable table 指定的日期的年月日分别对应表的 year 域,month 域,day 域
返回值 类型 说明
flag boolean true - 当前日期与指定日期相符,false - 当前日期与指定日期不符

函数用例

require "TSLib"--使用本函数库必须在脚本开头引用并将文件放到设备 lua 目录下
flag = isDay({year=2016,month=2,day=16})--判断是否是 2016 年 2 月 16 日
if flag then
    dialog("时间正确",5)
else
    dialog("时间错误",5)   
end
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""