Get(系统区域设置元素)

返回包含客户端系统区域设置相关信息的 JSON 对象。

格式 

Get(系统区域设置元素)

参数 

返回的数据类型 

文本

原始版本 

19.1.2

说明 

此函数返回有关系统区域设置的信息,即客户端操作系统的当前区域设置。Misc.Active 键表示当前用户使用的区域设置是系统的区域设置 (true) 还是文件的区域设置 (false)。此键对应“使用系统格式”设置(请参阅打开具有不同系统格式的文件)。

返回的 JSON 对象的根包含 APIVers 键,其值是 JSON 对象结构的版本号。如果此 JSON 对象的结构在后续版本中有更改,此版本号也会更改。

注释 

  • 在 FileMaker WebDirect 中:
    • 此函数返回有关主机系统区域设置的信息,而非 Web 浏览器(FileMaker WebDirect 客户端)的系统区域设置的信息。
    • Misc.Active 键的值始终为 false,因为 FileMaker WebDirect 始终使用文件的区域设置。

示例 1 

在操作系统语言设置为“英语”和地区设置为“美国”的系统上,返回以下 JSON 对象。Misc.Activetrue,因此系统的区域设置是当前用户使用的区域设置。

复制
{
    "APIVers" :1,
    "Currency" :
    {
        "Leading" : true,
        "Symbol" : "$"
    },
    "Date" :
    {
        "DMQ" :
        {
            "1stDayOfWeek" :1,
            "DaysOfWeek" :
            {
                "AbbrvList" :
                [
                    "Sun",
                    "Mon",
                    "Tue",
                    "Wed",
                    "Thu",
                    "Fri",
                    "Sat"
                ],
                "NameList" :
                [
                    "Sunday",
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday"
                ]
            },
            "Months" :
            {
                "AbbrvList" :
                [
                    "Jan",
                    "Feb",
                    "Mar",
                    "Apr",
                    "May",
                    "Jun",
                    "Jul",
                    "Aug",
                    "Sep",
                    "Oct",
                    "Nov",
                    "Dec"
                ],
                "NameList" :
                [
                    "January",
                    "February",
                    "March",
                    "April",
                    "May",
                    "June",
                    "July",
                    "August",
                    "September",
                    "October",
                    "November",
                    "December"
                ]
            },
            "Quarters" :
            {
                "AbbrvList" :
                [
                    "Q1",
                    "Q2",
                    "Q3",
                    "Q4"
                ],
                "NameList" :
                [
                    "1st Quarter",
                    "2nd Quarter",
                    "3rd Quarter",
                    "4th Quarter"
                ]
            }
        },
        "DateNums" :
        {
            "0d" : false,
            "0m" : false,
            "YYyy" : false
        },
        "DateOrderID" :0,
        "DateOrderName" :"MDY",
        "MDY" :
        {
            "ElementArray" :
            {
                "NameList" :
                [
                    "M$",
                    "D#",
                    "YYYY#",
                    "D$"
                ],
                "SepList" :
                [
                    ", ",
                    " ",
                    ", ",
                    ""
                ]
            },
            "MustUseLocalesSep" : false
        },
        "Sep" : "/"
    },
    "LocaleID" :
    {
        "IDNum" :21,
        "IDStr" :"English",
        "ISOLangCode" : "en",
        "LID" :"English",
        "Name" :"English"
    },
    "Misc" :
    {
        "Active" : true,
        "Metric" : false
    },
    "Num" :
    {
        "1000s" : ",",
        "Decimal" : ".",
        "Lead0" : true
    },
    "Text" :
    {
        "SQuotLead" : "“",
        "SQuotTrail" : "”",
        "Sep" : ","
    },
    "Time" :
    {
        "12h" : true,
        "HMS" :
        {
            "0h" : false,
            "24h" : "",
            "Seconds" : false
        },
        "NightDay" :
        {
            "12hSuffix" : true,
            "amStr" :" AM",
            "pmStr" :" PM"
        },
        "Sep" : ":"
    }
}

示例 2 

对于示例 1 中一样的系统,返回 1 (true),表示当前系统的区域设置使用 12 小时制。

复制
JSONGetElement ( Get ( 系统区域设置元素 ) ; "Time.12h" )