MsAjax Lib-> Date.localeFormat 函数

    技术2022-05-11  67

    Date.localeFormat 函数

    按当前计算机区域设定格式化日期。

    语法

    var formattedDate = dateVar.localeFormat(format);

    参数

    format

    格式化字符串。

    返回值

    格式化后的Date型对象。

    异常

    异常类型描述

    Sys.ArgumentException

    一个无效的 format 参数。

    备注

    使用 localeFormat 函数用format 参数的格式替换字符串。 localeFormat 方法提供了基于本地区域设置的 date 类型。 区域设置的值也用于显示特定语言或国家的特色。 更多关于区域设置和本地设置的信息,请参见ASP.NET Globalization and Localization and the CultureInfo documentation. For more information about date and time string formats, see Standard DateTime Format Strings and Standard DateTime Format Strings Output Examples.

    请参见

    Standard DateTime Format Strings Standard DateTime Format Strings Output Examples ASP.NET Globalization and Localization CultureInfo Globalizing a Date Using Client Script Date 类型扩展 JScript Language Reference  

    最新回复(0)