SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
Date.parseLocale (value, formats)
          Microsoft AJAX Library: Boolean Type Extensions                                              Creates a date from a locale-specific string. value is a locale-specific string that can
                                                                                                       be parsed as a date, and formats (optional) is an array of custom formats. Returns
                                                                                                       an object of type Date.
Boolean.parse (value )
Converts a string representation of a logical value to its Boolean object equivalent.                  Remarks
The value argument must be a string representation of a Boolean value containing
                                                                                                       This function uses the Sys.CultureInfo.CurrentCulture property to determine
either quot;truequot; or quot;falsequot; (case insensitive). The string can contain white space.
                                                                                                       the culture value.
var b = Boolean.parse(quot;truequot;);
                                                                                                       Sys.Debug.trace (Date.parseLocale (quot;4/10/2001quot;, quot;yyyy-MM-ddquot;,
                                                                                                       quot;MM/dd/yyyyquot;));
            Microsoft AJAX Library: Date Type Extensions                                               // Date.parseLocale will skip the first format here as invalid and use
                                                                                                       // the second one. If it does not find an appropriate format,
                                                                                                       // the function throws an exception.

Date. format (format)                                                                                  Date.parseInvariant (value, formats)
Formats a date using the invariant (culture-independent) culture.                                      Creates a date from a string. value is a locale-specific string that can be parsed as a
                                                                                                       date, and formats (optional) is an array of custom formats. Returns an object of
Remarks                                                                                                type Date.
The invariant culture is culture-insensitive. It is associated with the English                        Sys.Debug.trace (Date.parseInvariant (quot;4/10/2001quot;, quot;yyyy-MM-ddquot;,
language but not with any country or region. If a security decision depends on a                       quot;MM/dd/yyyyquot;));
                                                                                                       // Date.parseInvariant will skip the first format here as invalid and use
string comparison or a case-change operation, use the Date.format method. This
                                                                                                       // the second one. If it does not find an appropriate format,
makes sure that the behavior will be consistent regardless of the culture settings of
                                                                                                       // the function throws an exception.
the system.
                                                                                                       Supported formats
The invariant culture must be used only by processes that require culture-
                                                                                                       Below are examples of supported formats to use with Date.format and
independent results, such as system services. Otherwise, the method can produce
                                                                                                       Date.localeFormat (only invariant culture shown):
results that might be linguistically incorrect or culturally inappropriate.
var d = new Date();
                                                                                                          Format                                       Formatted date
Sys.Debug.trace (d.format(quot;dddd, dd MMMM yyyy HH:mm:ssquot;));
                                                                                                                         Short date pattern (e.g.: 02/17/2007)
                                                                                                             d
Date.localeFormat (format)
Formats a date using the current culture.                                                                                Long date pattern (e.g: Saturday, 17 February 2007)
                                                                                                             D
Remarks                                                                                                                  Short time pattern (e.g.: 22:10)
                                                                                                              t
The format parameter determines how the date will be presented. The                                                      Long time pattern (e.g.: 22:10:30)
                                                                                                             T
localeFormat method provides the date based on a specific culture value (locale).
                                                                                                                         Full date pattern (e.g.: Saturday, 17 February 2007 22:10:30)
                                                                                                              F
The culture value is also used to display web information for specific language and
country combinations.
                                                                                                                         Month and day pattern (e.g.: February 17)
                                                                                                         m (or M)
This function uses the Sys.CultureInfo.CurrentCulture property to determine
                                                                                                                         Sortable date and time pattern (e.g.: 2007-02-17T22:10:30)
                                                                                                              s
the culture value.
                                                                                                                         Year and month pattern (e.g.: 2007 February)
                                                                                                          y (or Y)
var d = new Date();
Sys.Debug.trace (d.localeFormat(quot;dddd, dd MMMM yyyy HH:mm:ssquot;));




   A function is static and is invoked without creating an instance of the object   Based on Microsoft AJAX Library 1.0 • Compiled by Milan Negovan • www.AspNetResources.com • Last update: 2007-01-24

Contenu connexe

Plus de jason hu 金良胡 (20)

Javascript 闭包
Javascript 闭包Javascript 闭包
Javascript 闭包
 
Windows Powershell En
Windows Powershell   EnWindows Powershell   En
Windows Powershell En
 
正则表达式
正则表达式正则表达式
正则表达式
 
Work In Japan
Work In JapanWork In Japan
Work In Japan
 
Linuxcommand
LinuxcommandLinuxcommand
Linuxcommand
 
Ubunturef
UbunturefUbunturef
Ubunturef
 
Asp.Net运行时
Asp.Net运行时Asp.Net运行时
Asp.Net运行时
 
Fwunixref
FwunixrefFwunixref
Fwunixref
 
X Query
X QueryX Query
X Query
 
Sql2005 Xml
Sql2005 XmlSql2005 Xml
Sql2005 Xml
 
Ms Ajax Dom Element Class
Ms Ajax Dom Element ClassMs Ajax Dom Element Class
Ms Ajax Dom Element Class
 
Ms Ajax Dom Element Class
Ms Ajax Dom Element ClassMs Ajax Dom Element Class
Ms Ajax Dom Element Class
 
Ms Ajax Number And Error Extensions
Ms Ajax Number And Error ExtensionsMs Ajax Number And Error Extensions
Ms Ajax Number And Error Extensions
 
Ms Ajax Dom Event Class
Ms Ajax Dom Event ClassMs Ajax Dom Event Class
Ms Ajax Dom Event Class
 
Ms Ajax Array Extensions
Ms Ajax Array ExtensionsMs Ajax Array Extensions
Ms Ajax Array Extensions
 
Ms Ajax String And Object Extensions
Ms Ajax String And Object ExtensionsMs Ajax String And Object Extensions
Ms Ajax String And Object Extensions
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 
Ext Js Dom Navigation
Ext Js Dom NavigationExt Js Dom Navigation
Ext Js Dom Navigation
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 
Ext J S Observable
Ext J S ObservableExt J S Observable
Ext J S Observable
 

Dernier

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Ms Ajax Date And Boolean Extensions

  • 1. Date.parseLocale (value, formats) Microsoft AJAX Library: Boolean Type Extensions Creates a date from a locale-specific string. value is a locale-specific string that can be parsed as a date, and formats (optional) is an array of custom formats. Returns an object of type Date. Boolean.parse (value ) Converts a string representation of a logical value to its Boolean object equivalent. Remarks The value argument must be a string representation of a Boolean value containing This function uses the Sys.CultureInfo.CurrentCulture property to determine either quot;truequot; or quot;falsequot; (case insensitive). The string can contain white space. the culture value. var b = Boolean.parse(quot;truequot;); Sys.Debug.trace (Date.parseLocale (quot;4/10/2001quot;, quot;yyyy-MM-ddquot;, quot;MM/dd/yyyyquot;)); Microsoft AJAX Library: Date Type Extensions // Date.parseLocale will skip the first format here as invalid and use // the second one. If it does not find an appropriate format, // the function throws an exception. Date. format (format) Date.parseInvariant (value, formats) Formats a date using the invariant (culture-independent) culture. Creates a date from a string. value is a locale-specific string that can be parsed as a date, and formats (optional) is an array of custom formats. Returns an object of Remarks type Date. The invariant culture is culture-insensitive. It is associated with the English Sys.Debug.trace (Date.parseInvariant (quot;4/10/2001quot;, quot;yyyy-MM-ddquot;, language but not with any country or region. If a security decision depends on a quot;MM/dd/yyyyquot;)); // Date.parseInvariant will skip the first format here as invalid and use string comparison or a case-change operation, use the Date.format method. This // the second one. If it does not find an appropriate format, makes sure that the behavior will be consistent regardless of the culture settings of // the function throws an exception. the system. Supported formats The invariant culture must be used only by processes that require culture- Below are examples of supported formats to use with Date.format and independent results, such as system services. Otherwise, the method can produce Date.localeFormat (only invariant culture shown): results that might be linguistically incorrect or culturally inappropriate. var d = new Date(); Format Formatted date Sys.Debug.trace (d.format(quot;dddd, dd MMMM yyyy HH:mm:ssquot;)); Short date pattern (e.g.: 02/17/2007) d Date.localeFormat (format) Formats a date using the current culture. Long date pattern (e.g: Saturday, 17 February 2007) D Remarks Short time pattern (e.g.: 22:10) t The format parameter determines how the date will be presented. The Long time pattern (e.g.: 22:10:30) T localeFormat method provides the date based on a specific culture value (locale). Full date pattern (e.g.: Saturday, 17 February 2007 22:10:30) F The culture value is also used to display web information for specific language and country combinations. Month and day pattern (e.g.: February 17) m (or M) This function uses the Sys.CultureInfo.CurrentCulture property to determine Sortable date and time pattern (e.g.: 2007-02-17T22:10:30) s the culture value. Year and month pattern (e.g.: 2007 February) y (or Y) var d = new Date(); Sys.Debug.trace (d.localeFormat(quot;dddd, dd MMMM yyyy HH:mm:ssquot;)); A function is static and is invoked without creating an instance of the object Based on Microsoft AJAX Library 1.0 • Compiled by Milan Negovan • www.AspNetResources.com • Last update: 2007-01-24