示例#1
0
        public static EcmaValue NumberingSystem([This] EcmaValue thisValue)
        {
            Locale         locale = thisValue.GetUnderlyingObject <Locale>();
            BcpLanguageTag tag    = BcpLanguageTag.Parse(locale.LocaleString);

            return(tag.UExtensions["nu"]);
        }
示例#2
0
        public static EcmaValue Region([This] EcmaValue thisValue)
        {
            Locale         locale = thisValue.GetUnderlyingObject <Locale>();
            BcpLanguageTag tag    = BcpLanguageTag.Parse(locale.LocaleString);

            return(tag.Region == "" ? default : tag.Region);
        }
示例#3
0
        public static EcmaValue Numeric([This] EcmaValue thisValue)
        {
            Locale         locale = thisValue.GetUnderlyingObject <Locale>();
            BcpLanguageTag tag    = BcpLanguageTag.Parse(locale.LocaleString);

            return(tag.UExtensions["kn"] == "" || tag.UExtensions["kn"] == "true");
        }
示例#4
0
        public static EcmaValue Language([This] EcmaValue thisValue)
        {
            Locale         locale = thisValue.GetUnderlyingObject <Locale>();
            BcpLanguageTag tag    = BcpLanguageTag.Parse(locale.LocaleString);

            return(tag.Language);
        }
示例#5
0
 public Locale Maximize()
 {
     return(new Locale(BcpLanguageTag.Parse(this.LocaleString).Maximize()));
 }