summaryrefslogtreecommitdiff
path: root/date-fns/src/locale/_lib/buildFormatLongFn/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'date-fns/src/locale/_lib/buildFormatLongFn/index.js')
-rw-r--r--date-fns/src/locale/_lib/buildFormatLongFn/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/date-fns/src/locale/_lib/buildFormatLongFn/index.js b/date-fns/src/locale/_lib/buildFormatLongFn/index.js
new file mode 100644
index 0000000..44da3fc
--- /dev/null
+++ b/date-fns/src/locale/_lib/buildFormatLongFn/index.js
@@ -0,0 +1,8 @@
+export default function buildFormatLongFn (args) {
+ return function (dirtyOptions) {
+ var options = dirtyOptions || {}
+ var width = options.width ? String(options.width) : args.defaultWidth
+ var format = args.formats[width] || args.formats[args.defaultWidth]
+ return format
+ }
+}