@procore/globalization-toolkit 1.15.0 → 1.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/numbers/NumberFormatter.js +1 -1
  2. package/dist/numbers/NumberFormatter.js.map +1 -1
  3. package/dist/numbers/NumberUtils.d.ts +5 -2
  4. package/dist/numbers/NumberUtils.js +77 -36
  5. package/dist/numbers/NumberUtils.js.map +1 -1
  6. package/dist/tsconfig.build.tsbuildinfo +1 -1
  7. package/docs/assets/highlight.css +58 -2
  8. package/docs/assets/search.js +1 -1
  9. package/docs/assets/style.css +34 -2
  10. package/docs/classes/CurrencyFormatter.html +25 -9
  11. package/docs/classes/DateTimeFormatter.html +10 -8
  12. package/docs/classes/NumberFormatter.html +13 -11
  13. package/docs/functions/formatCurrency.html +7 -4
  14. package/docs/functions/formatCurrencyToParts.html +6 -3
  15. package/docs/functions/formatDateTime.html +6 -3
  16. package/docs/functions/formatDateTimeToParts.html +6 -3
  17. package/docs/functions/formatNumber.html +7 -4
  18. package/docs/functions/formatNumberToParts.html +6 -3
  19. package/docs/functions/getCurrencySeparators.html +121 -0
  20. package/docs/functions/getNumberSeparators.html +6 -3
  21. package/docs/functions/getStartDayOfTheWeek.html +6 -3
  22. package/docs/functions/parseCurrency.html +6 -3
  23. package/docs/functions/parseNumber.html +6 -3
  24. package/docs/index.html +191 -4
  25. package/docs/interfaces/CurrencyOptions.html +11 -9
  26. package/docs/interfaces/DateTimeOptionsBasic.html +7 -5
  27. package/docs/interfaces/DateTimeOptionsComponentsAll.html +16 -14
  28. package/docs/interfaces/DateTimeOptionsComponentsHourMinute.html +16 -14
  29. package/docs/interfaces/DateTimeOptionsComponentsHourMinuteSecond.html +16 -14
  30. package/docs/interfaces/DateTimeOptionsComponentsMonthDay.html +16 -14
  31. package/docs/interfaces/DateTimeOptionsComponentsWeekdayYearMonthDay.html +16 -14
  32. package/docs/interfaces/DateTimeOptionsComponentsYearMonth.html +16 -14
  33. package/docs/interfaces/DateTimeOptionsComponentsYearMonthDay.html +16 -14
  34. package/docs/interfaces/DateTimeOptionsStyle.html +16 -14
  35. package/docs/interfaces/NumberOptions.html +9 -7
  36. package/docs/modules.html +6 -2
  37. package/docs/types/CurrencyDisplay.html +7 -4
  38. package/docs/types/CurrencySign.html +7 -4
  39. package/docs/types/DateStyle.html +7 -4
  40. package/docs/types/DateTimeFormatPart.html +6 -3
  41. package/docs/types/DateTimeOptions.html +6 -3
  42. package/docs/types/DateTimeStyle.html +7 -4
  43. package/docs/types/Day.html +7 -4
  44. package/docs/types/FormatterOptions.html +7 -4
  45. package/docs/types/Hour.html +7 -4
  46. package/docs/types/Locale.html +6 -3
  47. package/docs/types/Minute.html +7 -4
  48. package/docs/types/Month.html +7 -4
  49. package/docs/types/NumberFormatPart.html +6 -3
  50. package/docs/types/NumericTwoDigit.html +7 -4
  51. package/docs/types/Percent.html +7 -4
  52. package/docs/types/Second.html +7 -4
  53. package/docs/types/Separators.html +7 -4
  54. package/docs/types/TimeStyle.html +7 -4
  55. package/docs/types/Weekday.html +7 -4
  56. package/docs/types/Year.html +7 -4
  57. package/docs/variables/CurrencyDisplay-1.html +8 -5
  58. package/docs/variables/CurrencySign-1.html +8 -5
  59. package/docs/variables/DateStyle-1.html +8 -5
  60. package/docs/variables/DateTimeStyle-1.html +8 -5
  61. package/docs/variables/Day-1.html +8 -5
  62. package/docs/variables/Hour-1.html +8 -5
  63. package/docs/variables/Minute-1.html +8 -5
  64. package/docs/variables/Month-1.html +8 -5
  65. package/docs/variables/NumericTwoDigit-1.html +8 -5
  66. package/docs/variables/Percent-1.html +8 -5
  67. package/docs/variables/Second-1.html +8 -5
  68. package/docs/variables/TimeStyle-1.html +8 -5
  69. package/docs/variables/Weekday-1.html +8 -5
  70. package/docs/variables/Year-1.html +8 -5
  71. package/package.json +1 -1
package/docs/index.html CHANGED
@@ -1,11 +1,13 @@
1
1
  <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@procore/globalization-toolkit</title><meta name="description" content="Documentation for @procore/globalization-toolkit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base=".">
4
- <div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
5
7
  <ul class="results">
6
8
  <li class="state loading">Preparing search index...</li>
7
9
  <li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@procore/globalization-toolkit</a></div>
8
- <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
9
11
  <div class="container container-main">
10
12
  <div class="col-8 col-content">
11
13
  <div class="tsd-page-title">
@@ -18,12 +20,196 @@
18
20
  <p><a href="https://procoretech.slack.com/archives/C037J98SPHD"><img src="https://img.shields.io/badge/Maintainer-team--global--by--design-orange" alt="Maintainer"></a>
19
21
  <a href="https://circleci.com/gh/procore/globalization-toolkit/tree/main"><img src="https://circleci.com/gh/procore/globalization-toolkit/tree/main.svg?style=shield&circle-token=2f3787c62ef88e345956761b9d6e243f043a08a7" alt="CircleCI"></a>
20
22
  <a href="https://www.npmjs.com/package/@procore/globalization-toolkit"><img src="https://img.shields.io/badge/NPM-%40procore%2Fglobalization--toolkit-blue" alt="NPM"></a></p>
23
+ <p>Before implementing the Globalization Toolkit (GTK), please review the <a href="https://lucid.app/lucidchart/47c65380-9d87-409a-a15e-77c668e4c474/edit?invitationId=inv_abb5b5f8-3d6f-499f-920d-6dc6b7c9734c&amp;page=0_0#">Globalization Toolkit Adoption Diagram</a> to determine the best implementation strategy for you. Continue reading for instructions on direct usage of the GTK. </p>
24
+
25
+ <a href="#engineering-documentation" id="engineering-documentation" style="color: inherit; text-decoration: none;">
26
+ <h2><a href="https://procore.github.io/globalization-toolkit/">Engineering Documentation</a></h2>
27
+ </a>
28
+ <p>The engineering documentation contains technical documentation for the GTK repo. It details classes, types, interfaces, and features. Continue reading for install and usage instructions.
29
+ Further reading on the GTK:</p>
30
+ <ul>
31
+ <li><a href="https://docs.google.com/presentation/d/1FtB2DR5qroKgGcxxWsu5Ac9QHA01I7WM75FUeB67izE/edit?usp=sharing">GTK Adoption Training Presentation</a></li>
32
+ <li><a href="https://github.com/procore/system-design-records/blob/main/lifecycle/2-pilot/internationalization/0002-globalization-toolkit.md">GTK SDR</a></li>
33
+ <li><a href="">GTK FAQ</a> - Coming soon!</li>
34
+ </ul>
21
35
 
22
36
  <a href="#install" id="install" style="color: inherit; text-decoration: none;">
23
37
  <h2>Install</h2>
24
38
  </a>
39
+ <p>NPM</p>
25
40
  <pre><code class="language-sh"><span class="hl-0">$ npm i --save @procore/globalization-toolkit</span>
26
41
  </code></pre>
42
+ <p>YARN</p>
43
+ <pre><code class="language-sh"><span class="hl-0">$ yarn add @procore/globalization-toolkit</span>
44
+ </code></pre>
45
+
46
+ <a href="#usage" id="usage" style="color: inherit; text-decoration: none;">
47
+ <h2>Usage</h2>
48
+ </a>
49
+ <p>The GTK has 3 available classes: NumberFormatter, DateTimeFormatter, CurrencyFormatter. The structure of the GTK Library allows for instantiation of a formatting class with defined options. The instantiated class gives access to related functions. In addition, the GTK makes the class functions available as stand-alone functions. Below are examples of GTK usage with class formatter and with stand-alone functions. </p>
50
+
51
+ <a href="#a-note-on-locales" id="a-note-on-locales" style="color: inherit; text-decoration: none;">
52
+ <h3>A Note on Locales</h3>
53
+ </a>
54
+ <p>The GTK supports industry standard locale codes. The GTK does NOT support <a href="https://procoretech.atlassian.net/wiki/spaces/PLATFORM/pages/1039111578/Levels+of+Support+for+Locales+Product+Coverage#Custom-Locales">Procore Custom Locales</a>. When implementing the GTK, please sanitize the locale to follow industry standard of &#39;region-language&#39; like &#39;en-US&#39;.</p>
55
+
56
+ <a href="#numberformatter-class" id="numberformatter-class" style="color: inherit; text-decoration: none;">
57
+ <h3>NumberFormatter Class</h3>
58
+ </a>
59
+ <p>The GTK <code>NumberFormatter</code> class has the ability to format numbers for a given locale. The <a href="https://procore.github.io/globalization-toolkit/classes/NumberFormatter">NumberFormatter</a> class is instantiated with <a href="https://procore.github.io/globalization-toolkit/interfaces/NumberOptions.html">NumberOptions</a> and has 4 available functions: </p>
60
+ <ul>
61
+ <li><code>formatNumber(value: number)</code>, </li>
62
+ <li><code>formatNumberToParts(value: number)</code>, </li>
63
+ <li><code>parseNumber(value: string)</code>, and </li>
64
+ <li><code>getNumberSeparators(locale: string)</code>.</li>
65
+ </ul>
66
+ <p>The <a href="https://procore.github.io/globalization-toolkit/interfaces/CurrencyOptions.html">NumberOptions</a> are summarized below:</p>
67
+ <ul>
68
+ <li><code>locale</code>: string</li>
69
+ <li><code>maximumFractionDigits?</code>: number</li>
70
+ <li><code>minimumFractionDigits?</code>: number</li>
71
+ <li><code>percent?</code>: &#39;standard&#39;, &#39;decimal&#39;</li>
72
+ </ul>
73
+ <p>Below code blocks display usage of the NumberFormatter class and available functions. </p>
74
+
75
+ <a href="#formatnumber-amp-formatnumbertoparts" id="formatnumber-amp-formatnumbertoparts" style="color: inherit; text-decoration: none;">
76
+ <h4><a href="https://procore.github.io/globalization-toolkit/classes/NumberFormatter.html#formatNumber">formatNumber()</a> &amp; <a href="https://procore.github.io/globalization-toolkit/classes/NumberFormatter.html#formatNumberToParts">formatNumberToParts()</a></h4>
77
+ </a>
78
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">NumberFormatter</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-6">1234</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">numberOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;en-US&quot;</span><span class="hl-0">, </span><span class="hl-2">minimumFractionDigits:</span><span class="hl-0"> </span><span class="hl-6">3</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">NumberFormatter</span><span class="hl-0">(</span><span class="hl-2">numberOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatNumber</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">)) </span><span class="hl-8">// expected output: &#39;1,234.000&#39;</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatNumberToParts</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">))</span><br/><span class="hl-0"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * expected output is an array of objects representing the parts of the formatted number:</span><br/><span class="hl-8"> * [</span><br/><span class="hl-8"> * { type: &quot;integer&quot;, value: &quot;1&quot;, },</span><br/><span class="hl-8"> * { type: &quot;group&quot;, value: &quot;,&quot;, },</span><br/><span class="hl-8"> * { type: &quot;integer&quot;, value: &quot;234&quot;, },</span><br/><span class="hl-8"> * { type: &quot;decimal&quot;, value: &quot;.&quot;, },</span><br/><span class="hl-8"> * { type: &quot;fraction&quot;, value: &quot;000&quot;, },</span><br/><span class="hl-8"> * ];</span><br/><span class="hl-8"> */</span>
79
+ </code></pre>
80
+
81
+ <a href="#parsenumber" id="parsenumber" style="color: inherit; text-decoration: none;">
82
+ <h4><a href="https://procore.github.io/globalization-toolkit/classes/NumberFormatter.html#parseNumber">parseNumber()</a></h4>
83
+ </a>
84
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">NumberFormatter</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-3">&quot;123 456 789,12&quot;</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">numberOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;fr-FR&quot;</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">NumberFormatter</span><span class="hl-0">(</span><span class="hl-2">numberOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">parseNumber</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">)); </span><span class="hl-8">// expected output: &#39;123456789.12&#39;</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">parseNumber</span><span class="hl-0">(</span><span class="hl-3">&quot;Abcd&quot;</span><span class="hl-0">)); </span><span class="hl-8">// expected output: NaN</span>
85
+ </code></pre>
86
+
87
+ <a href="#getseparators" id="getseparators" style="color: inherit; text-decoration: none;">
88
+ <h4><a href="https://procore.github.io/globalization-toolkit/classes/NumberFormatter.html#getNumberSeparators">getSeparators()</a></h4>
89
+ </a>
90
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">NumberFormatter</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">germanNumberOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;de-DE&quot;</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">germanFormatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">NumberFormatter</span><span class="hl-0">(</span><span class="hl-2">germanNumberOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">germanFormatter</span><span class="hl-0">.</span><span class="hl-7">getSeparators</span><span class="hl-0">()); </span><span class="hl-8">// expected output: { decimal: &quot;,&quot;, group: &quot;.&quot; }</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">usNumberOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">NumberFormatter</span><span class="hl-0">(</span><span class="hl-2">usNumberOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">getSeparators</span><span class="hl-0">()); </span><span class="hl-8">// expected output: { decimal: &quot;.&quot;, group: &quot;,&quot; }</span>
91
+ </code></pre>
92
+
93
+ <a href="#numberformatter-functions" id="numberformatter-functions" style="color: inherit; text-decoration: none;">
94
+ <h3>NumberFormatter Functions</h3>
95
+ </a>
96
+ <p>The functions used on the NumberFormatter class are also available as stand alone functions. Read more information about each function in the GTK Documentation.</p>
97
+ <ul>
98
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/formatNumber.html">formatNumber</a></li>
99
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/formatNumberToParts.html">formatNumberToParts</a></li>
100
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/parseNumber.html">parseNumber</a></li>
101
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/getNumberSeparators.html">getNumberSeparators</a></li>
102
+ </ul>
103
+ <p>The example below shows usage of the stand alone function: <code>formatNumber()</code>.</p>
104
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">formatNumber</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-6">1234</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">numberOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;en-US&quot;</span><span class="hl-0">, </span><span class="hl-2">minimumFractionDigits:</span><span class="hl-0"> </span><span class="hl-6">3</span><span class="hl-0"> };</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-7">formatNumber</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">, </span><span class="hl-2">numberOptions</span><span class="hl-0">)) </span><span class="hl-8">// expected output: &#39;1,234.000&#39;</span>
105
+ </code></pre>
106
+
107
+ <a href="#currencyformatter-class" id="currencyformatter-class" style="color: inherit; text-decoration: none;">
108
+ <h3>CurrencyFormatter class</h3>
109
+ </a>
110
+ <p>The GTK CurrencyFormatter class has the ability to format a number with given options. The <a href="https://procore.github.io/globalization-toolkit/classes/CurrencyFormatter.html">CurrencyFormatter</a> class is instantiated with <a href="https://procore.github.io/globalization-toolkit/interfaces/CurrencyOptions.html">CurrencyOptions</a>.<br>The CurrencyFormatter has 4 available functions: </p>
111
+ <ul>
112
+ <li><code>formatCurrency(value: number)</code>, </li>
113
+ <li><code>formatCurrencyToParts(value: number)</code></li>
114
+ <li><code>parseCurrency(value: string)</code> </li>
115
+ <li><code>getCurrencySeparators()</code></li>
116
+ </ul>
117
+ <p>The <a href="https://procore.github.io/globalization-toolkit/interfaces/CurrencyOptions.html">CurrencyOptions</a> are summarized below:</p>
118
+ <ul>
119
+ <li><code>currencyIsoCode</code>: string (<a href="https://github.com/formatjs/formatjs/blob/main/packages/intl-enumerator/src/currencies.generated.ts">acceptable ISO codes</a>)</li>
120
+ <li><code>locale</code>: string</li>
121
+ <li><code>currencySign?</code>: &#39;accounting&#39;, &#39;standard&#39;</li>
122
+ <li><code>currencyDisplay?</code>: &#39;code&#39;, &#39;name&#39;, &#39;narrowSymbol&#39;, &#39;symbol&#39;</li>
123
+ <li><code>maximumFractionDigits?</code>: number</li>
124
+ <li><code>minimumFractionDigits?</code>: number</li>
125
+ </ul>
126
+ <p>Below code blocks display usage of the CurrencyFormatter class and available functions. </p>
127
+ <p><a href="https://procore.github.io/globalization-toolkit/classes/CurrencyFormatter.html#formatCurrency">formatCurrency(value: number)</a></p>
128
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-6">1234</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;en-US&quot;</span><span class="hl-0">, </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&quot;USD&quot;</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">CurrencyFormatter</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatCurrency</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">)) </span><span class="hl-8">// expected outcome: &#39;$1,234.00&#39;</span>
129
+ </code></pre>
130
+ <p>Usage with currencyDisplay option</p>
131
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">CurrencyFormatter</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-6">1234.567</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0">: </span><span class="hl-9">CurrencyOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;de-DE&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&quot;USD&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencyDisplay:</span><span class="hl-0"> </span><span class="hl-3">&quot;name&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">CurrencyFormatter</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatCurrency</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">)); </span><span class="hl-8">// expected outcome: &#39;1.234,57 US-Dollar&#39;</span>
132
+ </code></pre>
133
+ <p>Usage with minimumFractionDigits and currencyDisplay</p>
134
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-6">1234.567</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;ja-JP&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">minimumFractionDigits:</span><span class="hl-0"> </span><span class="hl-6">2</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&quot;JPY&quot;</span><span class="hl-0">,</span><br/><span class="hl-0">};</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">CurrencyFormatter</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatCurrency</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">)); </span><span class="hl-8">// expected outcome: &#39;¥1,234.57&#39;</span>
135
+ </code></pre>
136
+ <p><a href="https://procore.github.io/globalization-toolkit/classes/CurrencyFormatter.html#formatCurrencyToParts">formatCurrencyToParts()</a></p>
137
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">CurrencyFormatter</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = -</span><span class="hl-6">1234.56</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0">: </span><span class="hl-9">CurrencyOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;en-US&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&quot;CAD&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencySign:</span><span class="hl-0"> </span><span class="hl-3">&quot;accounting&quot;</span><span class="hl-0">,</span><br/><span class="hl-0">};</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">CurrencyFormatter</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">);</span><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatCurrencyToParts</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">));</span><br/><span class="hl-0"> </span><span class="hl-8">/** expected output:</span><br/><span class="hl-8"> * [</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot;(&quot;, },</span><br/><span class="hl-8"> * { type: &quot;currency&quot;, value: &quot;CA$&quot;, },</span><br/><span class="hl-8"> * { type: &quot;integer&quot;, value: &quot;1&quot;, },</span><br/><span class="hl-8"> * { type: &quot;group&quot;, value: &quot;,&quot;, },</span><br/><span class="hl-8"> * { type: &quot;integer&quot;, value: &quot;234&quot;, },</span><br/><span class="hl-8"> * { type: &quot;decimal&quot;, value: &quot;.&quot;, },</span><br/><span class="hl-8"> * { type: &quot;fraction&quot;, value: &quot;56&quot;, },</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot;)&quot;, },</span><br/><span class="hl-8"> * ]</span><br/><span class="hl-8"> **/</span>
138
+ </code></pre>
139
+ <p><a href="https://procore.github.io/globalization-toolkit/classes/CurrencyFormatter.html#parseCurrency">parseCurrency(value: string)</a></p>
140
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-3">&quot;(1 234 567,56 €)&quot;</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0">: </span><span class="hl-9">CurrencyOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;fr-FR&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&quot;EUR&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">currencySign:</span><span class="hl-0"> </span><span class="hl-3">&quot;accounting&quot;</span><span class="hl-0">,</span><br/><span class="hl-0">};</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">CurrencyFormatter</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">parseCurrency</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">)); </span><span class="hl-8">// expected outcome: -1234567.56</span>
141
+ </code></pre>
142
+ <p><a href="https://procore.github.io/globalization-toolkit/classes/CurrencyFormatter.html#getCurrencySeparators">getCurrencySeparators</a></p>
143
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;de-DE&quot;</span><span class="hl-0">, </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&quot;EUR&quot;</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">CurrencyFormatter</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">getCurrencySeparators</span><span class="hl-0">()) </span><span class="hl-8">// expected outcome: { decimal: &quot;,&quot;, group: &quot;.&quot; }</span>
144
+ </code></pre>
145
+
146
+ <a href="#currencyformatter-functions" id="currencyformatter-functions" style="color: inherit; text-decoration: none;">
147
+ <h3>CurrencyFormatter Functions</h3>
148
+ </a>
149
+ <p>The functions used on the CurrencyFormatter class are also available as stand alone functions. Read more information about each function in the GTK Documentation.</p>
150
+ <ul>
151
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/formatCurrency.html">formatCurrency</a></li>
152
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/formatCurrencyToParts.html">formatCurrencyToParts</a></li>
153
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/parseCurrency.html">parseCurrency</a></li>
154
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/getCurrencySeparators.html">getCurrencySeparators</a></li>
155
+ </ul>
156
+ <p>The example below shows usage of the stand alone function: <code>formatCurrency(value, options)</code>.</p>
157
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">formatCurrency</span><span class="hl-0">, </span><span class="hl-2">getCurrencySeparators</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-6">1234</span><span class="hl-0">;</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">currencyOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-0">, </span><span class="hl-2">currencyIsoCode:</span><span class="hl-0"> </span><span class="hl-3">&#39;USD&#39;</span><span class="hl-0"> };</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-7">formatCurrency</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">, </span><span class="hl-2">currencyOptions</span><span class="hl-0">)) </span><span class="hl-8">// expected output: &#39;$1,234.00&#39;</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-7">getCurrencySeparators</span><span class="hl-0">(</span><span class="hl-2">currencyOptions</span><span class="hl-0">)) </span><span class="hl-8">// expected output: { decimal: &quot;.&quot;, group: &quot;,&quot; }</span>
158
+ </code></pre>
159
+
160
+ <a href="#datetimeformatter" id="datetimeformatter" style="color: inherit; text-decoration: none;">
161
+ <h3>DateTimeFormatter</h3>
162
+ </a>
163
+ <p>The GTK DateTimeFormatter class has the ability to format date and time for the correct timezone. The <a href="https://procore.github.io/globalization-toolkit/classes/DateTimeFormatter.html">DateTimeFormatter</a> class is instantiated with <a href="https://procore.github.io/globalization-toolkit/types/DateTimeOptions.html">DateTimeOptions</a>.<br>The DateTimeFormatter has 3 available functions: </p>
164
+ <ul>
165
+ <li><code>formatDateTime(value: Date)</code>, </li>
166
+ <li><code>formatDateTimeToParts(value: Date)</code>, and</li>
167
+ <li><code>getStartDayOfTheWeek()</code></li>
168
+ </ul>
169
+ <p>The DateTimeOptions can be used in two ways, but the two options cannot be combined. This follows the pattern of Intl.DateTimeFormat.</p>
170
+ <ol>
171
+ <li>Style Options:<ul>
172
+ <li>timeStyle: &#39;short&#39;, &#39;medium&#39;, &#39;long&#39;, &#39;full&#39;</li>
173
+ <li>dateStyle: &#39;short&#39;, &#39;medium&#39;, &#39;long&#39;, &#39;full&#39;</li>
174
+ </ul>
175
+ </li>
176
+ <li>Component Options<ul>
177
+ <li>weekday: &#39;long&#39;, &#39;short&#39;, &#39;narrow&#39;</li>
178
+ <li>year: &#39;numeric&#39;, &#39;2-digit&#39;</li>
179
+ <li>month: numeric&#39;, &#39;2-digit&#39;, &#39;long&#39;, &#39;short&#39;, &#39;narrow&#39;</li>
180
+ <li>day: &#39;numeric&#39;, &#39;2-digit&#39;</li>
181
+ <li>hour: &#39;numeric&#39;, &#39;2-digit&#39;</li>
182
+ <li>minute: &#39;numeric&#39;, &#39;2-digit&#39;</li>
183
+ <li>second: &#39;numeric&#39;, &#39;2-digit&#39;</li>
184
+ </ul>
185
+ </li>
186
+ </ol>
187
+ <p>Below code blocks display usage of the DateTimeFormatter class and available functions.<br><a href="https://procore.github.io/globalization-toolkit/classes/DateTimeFormatter.html#formatDateTime">formatDateTime(value: Date)</a><br>SIMPLE OPTIONS</p>
188
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">DateTimeFormatter</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">Date</span><span class="hl-0">(</span><span class="hl-6">1445419756738</span><span class="hl-0">);</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">dateTimeOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">timeZone:</span><span class="hl-0"> </span><span class="hl-3">&#39;UTC&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">dateStyle:</span><span class="hl-0"> </span><span class="hl-3">&#39;full&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">timeStyle:</span><span class="hl-0"> </span><span class="hl-3">&#39;long&#39;</span><span class="hl-0">,</span><br/><span class="hl-0">};</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">DateTimeFormatter</span><span class="hl-0">(</span><span class="hl-2">dateTimeOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatDateTime</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">))</span><br/><span class="hl-8">// expected output: Wednesday, October 21, 2015 at 9:29:16 AM UTC</span>
189
+ </code></pre>
190
+ <p>COMPLEX OPTIONS</p>
191
+ <pre><code class="language-js"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">Date</span><span class="hl-0">(</span><span class="hl-2">Date</span><span class="hl-0">.</span><span class="hl-7">UTC</span><span class="hl-0">(</span><span class="hl-6">1885</span><span class="hl-0">, </span><span class="hl-6">8</span><span class="hl-0">, </span><span class="hl-6">1</span><span class="hl-0">, </span><span class="hl-6">12</span><span class="hl-0">, </span><span class="hl-6">0</span><span class="hl-0">, </span><span class="hl-6">16</span><span class="hl-0">, </span><span class="hl-6">738</span><span class="hl-0">));</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">dateTimeOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">timeZone:</span><span class="hl-0"> </span><span class="hl-3">&#39;UTC&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">weekday:</span><span class="hl-0"> </span><span class="hl-3">&#39;long&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">year:</span><span class="hl-0"> </span><span class="hl-3">&#39;numeric&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">month:</span><span class="hl-0"> </span><span class="hl-3">&#39;2-digit&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">day:</span><span class="hl-0"> </span><span class="hl-3">&#39;2-digit&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">hour:</span><span class="hl-0"> </span><span class="hl-3">&#39;numeric&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">minute:</span><span class="hl-0"> </span><span class="hl-3">&#39;2-digit&#39;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">second:</span><span class="hl-0"> </span><span class="hl-3">&#39;2-digit&#39;</span><span class="hl-0">,</span><br/><span class="hl-0">};</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">DateTimeFormatter</span><span class="hl-0">(</span><span class="hl-2">dateTimeOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatDateTime</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">))</span><br/><span class="hl-8">// expected output: &quot;Tuesday, 09/01/1885, 12:00:16 PM&quot;;</span>
192
+ </code></pre>
193
+ <p><a href="https://procore.github.io/globalization-toolkit/classes/DateTimeFormatter.html#formatDateTimeToParts">formatDateTimeToParts(value: Date)</a></p>
194
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">Date</span><span class="hl-0">(</span><span class="hl-2">Date</span><span class="hl-0">.</span><span class="hl-7">UTC</span><span class="hl-0">(</span><span class="hl-6">1955</span><span class="hl-0">, </span><span class="hl-6">10</span><span class="hl-0">, </span><span class="hl-6">5</span><span class="hl-0">, </span><span class="hl-6">6</span><span class="hl-0">, </span><span class="hl-6">0</span><span class="hl-0">, </span><span class="hl-6">16</span><span class="hl-0">, </span><span class="hl-6">738</span><span class="hl-0">));</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">dateTimeOptions</span><span class="hl-0"> = {</span><br/><span class="hl-0"> </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;en-GB&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">timeZone:</span><span class="hl-0"> </span><span class="hl-3">&quot;UTC&quot;</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">dateStyle:</span><span class="hl-0"> </span><span class="hl-2">DateStyle</span><span class="hl-0">.</span><span class="hl-5">FULL</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">timeStyle:</span><span class="hl-0"> </span><span class="hl-2">TimeStyle</span><span class="hl-0">.</span><span class="hl-5">SHORT</span><span class="hl-0">,</span><br/><span class="hl-0">};</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">DateTimeFormatter</span><span class="hl-0">(</span><span class="hl-2">dateTimeOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">formatDateTime</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">))</span><br/><span class="hl-0"> </span><span class="hl-8">/** expected output: </span><br/><span class="hl-8"> * [ { type: &quot;weekday&quot;, value: &quot;Saturday&quot;, },</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot;, &quot;, },</span><br/><span class="hl-8"> * { type: &quot;day&quot;, value: &quot;5&quot;, },</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot; &quot;, },</span><br/><span class="hl-8"> * { type: &quot;month&quot;, value: &quot;November&quot;, },</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot; &quot;, },</span><br/><span class="hl-8"> * { type: &quot;year&quot;, value: &quot;1955&quot;, },</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot; at &quot;,},</span><br/><span class="hl-8"> * { type: &quot;hour&quot;, value: &quot;06&quot;,},</span><br/><span class="hl-8"> * { type: &quot;literal&quot;, value: &quot;:&quot;,},</span><br/><span class="hl-8"> * { type: &quot;minute&quot;, value: &quot;00&quot;,}, ];</span><br/><span class="hl-8"> **/</span>
195
+ </code></pre>
196
+ <p><a href="https://procore.github.io/globalization-toolkit/classes/DateTimeFormatter.html#getStartDayOfTheWeek">getStartDayOfTheWeek()</a><br>This function returns an index value representing the start day of the week on the locale&#39;s calendar { Sunday: 0, Monday: 1 ...etc }</p>
197
+ <pre><code class="language-ts"><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">dateTimeOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&#39;en-US&#39;</span><span class="hl-0"> };</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">formatter</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">DateTimeFormatter</span><span class="hl-0">(</span><span class="hl-2">dateTimeOptions</span><span class="hl-0">);</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-2">formatter</span><span class="hl-0">.</span><span class="hl-7">startDayOfTheWeek</span><span class="hl-0">()); </span><span class="hl-8">// expected output: 0</span>
198
+ </code></pre>
199
+
200
+ <a href="#datetimeformatter-functions" id="datetimeformatter-functions" style="color: inherit; text-decoration: none;">
201
+ <h3>DateTimeFormatter Functions</h3>
202
+ </a>
203
+ <p>The functions used on the NumberFormatter class are also available as stand alone functions. Read more information about each function in the GTK Documentation.</p>
204
+ <ul>
205
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/formatDateTime.html">formatDateTime()</a></li>
206
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/formatDateTimeToParts.html">formaDateTimeToParts()</a></li>
207
+ <li><a href="https://procore.github.io/globalization-toolkit/functions/getStartDayOfTheWeek.html">getStartDayOfTheWeek(locale: string)</a></li>
208
+ </ul>
209
+ <p>The example below shows usage of the stand alone function: <code>formatDateTime()</code>.</p>
210
+ <pre><code class="language-ts"><span class="hl-1">import</span><span class="hl-0"> { </span><span class="hl-2">formatDateTime</span><span class="hl-0"> } </span><span class="hl-1">from</span><span class="hl-0"> </span><span class="hl-3">&#39;@procore/globalization-toolkit&#39;</span><span class="hl-0">;</span><br/><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">value</span><span class="hl-0"> = </span><span class="hl-4">new</span><span class="hl-0"> </span><span class="hl-7">Date</span><span class="hl-0">(</span><span class="hl-2">Date</span><span class="hl-0">.</span><span class="hl-7">UTC</span><span class="hl-0">(</span><span class="hl-6">1955</span><span class="hl-0">, </span><span class="hl-6">10</span><span class="hl-0">, </span><span class="hl-6">5</span><span class="hl-0">, </span><span class="hl-6">6</span><span class="hl-0">, </span><span class="hl-6">0</span><span class="hl-0">, </span><span class="hl-6">16</span><span class="hl-0">, </span><span class="hl-6">738</span><span class="hl-0">));</span><br/><span class="hl-4">const</span><span class="hl-0"> </span><span class="hl-5">dateTimeOptions</span><span class="hl-0"> = { </span><span class="hl-2">locale:</span><span class="hl-0"> </span><span class="hl-3">&quot;en-US&quot;</span><span class="hl-0">, </span><span class="hl-2">timeZone:</span><span class="hl-0"> </span><span class="hl-3">&quot;UTC&quot;</span><span class="hl-0"> };</span><br/><br/><span class="hl-2">console</span><span class="hl-0">.</span><span class="hl-7">log</span><span class="hl-0">(</span><span class="hl-7">formatDateTime</span><span class="hl-0">(</span><span class="hl-2">value</span><span class="hl-0">, </span><span class="hl-2">dateTimeOptions</span><span class="hl-0">)) </span><span class="hl-8">// expected output: 11/5/1955</span>
211
+ </code></pre>
212
+ <hr>
27
213
 
28
214
  <a href="#developing" id="developing" style="color: inherit; text-decoration: none;">
29
215
  <h1>Developing</h1>
@@ -42,10 +228,10 @@
42
228
  <a href="#testing" id="testing" style="color: inherit; text-decoration: none;">
43
229
  <h2>Testing</h2>
44
230
  </a>
45
- <pre><code class="language-sh"><span class="hl-0">$ npm run </span><span class="hl-1">test</span>
231
+ <pre><code class="language-sh"><span class="hl-0">$ npm run </span><span class="hl-7">test</span>
46
232
  </code></pre>
47
233
  <p>If adding a new supported export (or removing one in a breaking change), update the snapshot test output and commit the change.</p>
48
- <pre><code class="language-sh"><span class="hl-0">$ npm run </span><span class="hl-1">test</span><span class="hl-0"> -- -u</span>
234
+ <pre><code class="language-sh"><span class="hl-0">$ npm run </span><span class="hl-7">test</span><span class="hl-0"> -- -u</span>
49
235
  </code></pre>
50
236
  <p>To check formatting run <code>npm run lint:check</code> and <code>npm run format:check</code>.</p>
51
237
 
@@ -198,6 +384,7 @@ and can be found in the <strong>Releases</strong> section of Github.</p>
198
384
  <li class="tsd-kind-function"><a href="functions/formatDateTimeToParts.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>format<wbr/>Date<wbr/>Time<wbr/>To<wbr/>Parts</a></li>
199
385
  <li class="tsd-kind-function"><a href="functions/formatNumber.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>format<wbr/>Number</a></li>
200
386
  <li class="tsd-kind-function"><a href="functions/formatNumberToParts.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>format<wbr/>Number<wbr/>To<wbr/>Parts</a></li>
387
+ <li class="tsd-kind-function"><a href="functions/getCurrencySeparators.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>get<wbr/>Currency<wbr/>Separators</a></li>
201
388
  <li class="tsd-kind-function"><a href="functions/getNumberSeparators.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>get<wbr/>Number<wbr/>Separators</a></li>
202
389
  <li class="tsd-kind-function"><a href="functions/getStartDayOfTheWeek.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>get<wbr/>Start<wbr/>Day<wbr/>Of<wbr/>The<wbr/>Week</a></li>
203
390
  <li class="tsd-kind-function"><a href="functions/parseCurrency.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>parse<wbr/>Currency</a></li>
@@ -1,11 +1,13 @@
1
1
  <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CurrencyOptions | @procore/globalization-toolkit</title><meta name="description" content="Documentation for @procore/globalization-toolkit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
- <div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
5
7
  <ul class="results">
6
8
  <li class="state loading">Preparing search index...</li>
7
9
  <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@procore/globalization-toolkit</a></div>
8
- <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
9
11
  <div class="container container-main">
10
12
  <div class="col-8 col-content">
11
13
  <div class="tsd-page-title">
@@ -20,7 +22,7 @@
20
22
  <ul class="tsd-hierarchy">
21
23
  <li><span class="target">CurrencyOptions</span></li></ul></li></ul></section><aside class="tsd-sources">
22
24
  <ul>
23
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/numbers/Currency.types.ts#L21">numbers/Currency.types.ts:21</a></li></ul></aside>
25
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/numbers/Currency.types.ts#L21">numbers/Currency.types.ts:21</a></li></ul></aside>
24
26
  <section class="tsd-panel-group tsd-index-group">
25
27
  <section class="tsd-panel tsd-index-panel">
26
28
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -41,35 +43,35 @@
41
43
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>currency<wbr/>Display</span><a href="#currencyDisplay" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
42
44
  <div class="tsd-signature">currency<wbr/>Display<span class="tsd-signature-symbol">?:</span> <a href="../variables/CurrencyDisplay-1.html" class="tsd-signature-type" data-tsd-kind="Variable">CurrencyDisplay</a></div><aside class="tsd-sources">
43
45
  <ul>
44
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/numbers/Currency.types.ts#L23">numbers/Currency.types.ts:23</a></li></ul></aside></section>
46
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/numbers/Currency.types.ts#L23">numbers/Currency.types.ts:23</a></li></ul></aside></section>
45
47
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="currencyIsoCode" class="tsd-anchor"></a>
46
48
  <h3 class="tsd-anchor-link"><span>currency<wbr/>Iso<wbr/>Code</span><a href="#currencyIsoCode" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
47
49
  <div class="tsd-signature">currency<wbr/>Iso<wbr/>Code<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
48
50
  <ul>
49
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/numbers/Currency.types.ts#L22">numbers/Currency.types.ts:22</a></li></ul></aside></section>
51
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/numbers/Currency.types.ts#L22">numbers/Currency.types.ts:22</a></li></ul></aside></section>
50
52
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="currencySign" class="tsd-anchor"></a>
51
53
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>currency<wbr/>Sign</span><a href="#currencySign" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
52
54
  <div class="tsd-signature">currency<wbr/>Sign<span class="tsd-signature-symbol">?:</span> <a href="../variables/CurrencySign-1.html" class="tsd-signature-type" data-tsd-kind="Variable">CurrencySign</a></div><aside class="tsd-sources">
53
55
  <ul>
54
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/numbers/Currency.types.ts#L24">numbers/Currency.types.ts:24</a></li></ul></aside></section>
56
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/numbers/Currency.types.ts#L24">numbers/Currency.types.ts:24</a></li></ul></aside></section>
55
57
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="locale" class="tsd-anchor"></a>
56
58
  <h3 class="tsd-anchor-link"><span>locale</span><a href="#locale" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
57
59
  <div class="tsd-signature">locale<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
58
60
  <p>Inherited from NumberOptionsBasic.locale</p>
59
61
  <ul>
60
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/Formatter.types.ts#L4">Formatter.types.ts:4</a></li></ul></aside></section>
62
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/Formatter.types.ts#L4">Formatter.types.ts:4</a></li></ul></aside></section>
61
63
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="maximumFractionDigits" class="tsd-anchor"></a>
62
64
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>maximum<wbr/>Fraction<wbr/>Digits</span><a href="#maximumFractionDigits" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
63
65
  <div class="tsd-signature">maximum<wbr/>Fraction<wbr/>Digits<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
64
66
  <p>Inherited from NumberOptionsBasic.maximumFractionDigits</p>
65
67
  <ul>
66
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/numbers/Number.types.ts#L5">numbers/Number.types.ts:5</a></li></ul></aside></section>
68
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/numbers/Number.types.ts#L5">numbers/Number.types.ts:5</a></li></ul></aside></section>
67
69
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="minimumFractionDigits" class="tsd-anchor"></a>
68
70
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>minimum<wbr/>Fraction<wbr/>Digits</span><a href="#minimumFractionDigits" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
69
71
  <div class="tsd-signature">minimum<wbr/>Fraction<wbr/>Digits<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
70
72
  <p>Inherited from NumberOptionsBasic.minimumFractionDigits</p>
71
73
  <ul>
72
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/numbers/Number.types.ts#L4">numbers/Number.types.ts:4</a></li></ul></aside></section></section></div>
74
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/numbers/Number.types.ts#L4">numbers/Number.types.ts:4</a></li></ul></aside></section></section></div>
73
75
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
74
76
  <div class="tsd-navigation settings">
75
77
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -1,11 +1,13 @@
1
1
  <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>DateTimeOptionsBasic | @procore/globalization-toolkit</title><meta name="description" content="Documentation for @procore/globalization-toolkit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
- <div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
5
7
  <ul class="results">
6
8
  <li class="state loading">Preparing search index...</li>
7
9
  <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@procore/globalization-toolkit</a></div>
8
- <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
9
11
  <div class="container container-main">
10
12
  <div class="col-8 col-content">
11
13
  <div class="tsd-page-title">
@@ -29,7 +31,7 @@
29
31
  <li><a href="DateTimeOptionsComponentsHourMinuteSecond.html" class="tsd-signature-type" data-tsd-kind="Interface">DateTimeOptionsComponentsHourMinuteSecond</a></li>
30
32
  <li><a href="DateTimeOptionsComponentsHourMinute.html" class="tsd-signature-type" data-tsd-kind="Interface">DateTimeOptionsComponentsHourMinute</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources">
31
33
  <ul>
32
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/dateTimes/DateTime.types.ts#L55">dateTimes/DateTime.types.ts:55</a></li></ul></aside>
34
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/dateTimes/DateTime.types.ts#L55">dateTimes/DateTime.types.ts:55</a></li></ul></aside>
33
35
  <section class="tsd-panel-group tsd-index-group">
34
36
  <section class="tsd-panel tsd-index-panel">
35
37
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -47,12 +49,12 @@
47
49
  <div class="tsd-signature">locale<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
48
50
  <p>Inherited from FormatterOptions.locale</p>
49
51
  <ul>
50
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/Formatter.types.ts#L4">Formatter.types.ts:4</a></li></ul></aside></section>
52
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/Formatter.types.ts#L4">Formatter.types.ts:4</a></li></ul></aside></section>
51
53
  <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="timeZone" class="tsd-anchor"></a>
52
54
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>time<wbr/>Zone</span><a href="#timeZone" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
53
55
  <div class="tsd-signature">time<wbr/>Zone<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
54
56
  <ul>
55
- <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/e656fa8/src/dateTimes/DateTime.types.ts#L56">dateTimes/DateTime.types.ts:56</a></li></ul></aside></section></section></div>
57
+ <li>Defined in <a href="https://github.com/procore/globalization-toolkit/blob/9bd129c/src/dateTimes/DateTime.types.ts#L56">dateTimes/DateTime.types.ts:56</a></li></ul></aside></section></section></div>
56
58
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
57
59
  <div class="tsd-navigation settings">
58
60
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">