sv.js 2.0 KB

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