sv.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //! moment.js locale configuration
  2. //! locale : Swedish [sv]
  3. //! author : Jens Alm : https://github.com/ulmus
  4. ;(function (global, factory) {
  5. typeof exports === 'object' && typeof module !== 'undefined'
  6. && typeof require === 'function' ? factory(require('../moment')) :
  7. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  8. factory(global.moment)
  9. }(this, (function (moment) { 'use strict';
  10. //! moment.js locale configuration
  11. var sv = moment.defineLocale('sv', {
  12. months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
  13. '_'
  14. ),
  15. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  16. weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  17. weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  18. weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
  19. longDateFormat: {
  20. LT: 'HH:mm',
  21. LTS: 'HH:mm:ss',
  22. L: 'YYYY-MM-DD',
  23. LL: 'D MMMM YYYY',
  24. LLL: 'D MMMM YYYY [kl.] HH:mm',
  25. LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
  26. lll: 'D MMM YYYY HH:mm',
  27. llll: 'ddd D MMM YYYY HH:mm',
  28. },
  29. calendar: {
  30. sameDay: '[Idag] LT',
  31. nextDay: '[Imorgon] LT',
  32. lastDay: '[Igår] LT',
  33. nextWeek: '[På] dddd LT',
  34. lastWeek: '[I] dddd[s] LT',
  35. sameElse: 'L',
  36. },
  37. relativeTime: {
  38. future: 'om %s',
  39. past: 'för %s sedan',
  40. s: 'några sekunder',
  41. ss: '%d sekunder',
  42. m: 'en minut',
  43. mm: '%d minuter',
  44. h: 'en timme',
  45. hh: '%d timmar',
  46. d: 'en dag',
  47. dd: '%d dagar',
  48. M: 'en månad',
  49. MM: '%d månader',
  50. y: 'ett år',
  51. yy: '%d år',
  52. },
  53. dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
  54. ordinal: function (number) {
  55. var b = number % 10,
  56. output =
  57. ~~((number % 100) / 10) === 1
  58. ? ':e'
  59. : b === 1
  60. ? ':a'
  61. : b === 2
  62. ? ':a'
  63. : b === 3
  64. ? ':e'
  65. : ':e';
  66. return number + output;
  67. },
  68. week: {
  69. dow: 1, // Monday is the first day of the week.
  70. doy: 4, // The week that contains Jan 4th is the first week of the year.
  71. },
  72. });
  73. return sv;
  74. })));