hunk.code_window: export {default as enCA} from './en-CA/index.js'
   export {default as enGB} from './en-GB/index.js'
   export {default as enUS} from './en-US/index.js'
   export {default as eo} from './eo/index.js'
   export {default as nb} from './nb/index.js'
   export {default as ru} from './ru/index.js'
   export {default as sv} from './sv/index.js'
   export {default as uk} from './uk/index.js'
  
hunk.labels: keep keep keep add keep keep keep keep
hunk.after_edit: export {default as fr} from './fr/index.js'
  
hunk.file_path: src/esm/locale/index.js
hunk.type: add
file: // @flow
  /* eslint-env mocha */
  
  import assert from 'power-assert'
  import locale from '.'
  
  import format from '../../format'
  import formatDistance from '../../formatDistance'
  import formatDistanceStrict from '../../formatDistanceStrict'
  import formatRelative from '../../formatRelative'
  import parse from '../../parse'
  
  describe('sv locale', function () {
    context('with `format`', function () {
      var date = new Date(1986, 3 /* Apr */, 5, 10, 32, 0, 900)
  
      it('era', function () {
        var result = format(date, 'G, GGGG, GGGGG', {locale: locale})
        assert(result === 'e.Kr., efter Kristus, e.Kr.')
      })
  
      describe('year', function () {
        it('ordinal regular year', function () {
          var result = format(date, "yo 'året'", {locale: locale})
          assert(result === '1986:e året')
        })
  
        it('ordinal local week-numbering year', function () {
          var result = format(date, "Yo 'veckoslutande år'", {locale: locale})
          assert(result === '1986:e veckoslutande år')
        })
      })
  
      describe('quarter', function () {
        it('formatting quarter', function () {
          var result = format(date, "Qo 'kvartalet', QQQ, QQQQ, QQQQQ", {locale: locale})
          assert(result === '2:a kvartalet, Q2, 2:a kvartalet, 2')
        })
  
        it('stand-alone quarter', function () {
          var result = format(date, "qo 'kvartalet', qqq, qqqq, qqqqq", {locale: locale})
          assert(result === '2:a kvartalet, Q2, 2:a kvartalet, 2')
        })
      })
  
      describe('month', function () {
        it('formatting month', function () {
          var result = format(date, 'do MMMM', {locale: locale})
          assert(result === '5:e april')
        })
  
        it('stand-alone month', function () {
          var result = format(date, "Lo 'månaden', LLL, LLLL", {locale: locale})
          assert(result === '4:e månaden, apr., april')
        })
      })
  
      describe('week', function () {
        it('ordinal local week of year', function () {
          var date = new Date(1986, 3 /* Apr */, 6)
          var result = format(date, "wo 'veckan'", {locale: locale})
          assert(result === '14:e veckan')
        })
  
        it('ordinal ISO week of year', function () {
          var date = new Date(1986, 3 /* Apr */, 6)
          var result = format(date, "Io 'ISO veckan'", {locale: locale})
          assert(result === '14:e ISO veckan')
        })
      })
  
      describe('day', function () {
        it('ordinal date', function () {
          var result = format(date, "'idag är den' do", {locale: locale})
          assert(result === 'idag är den 5:e')
        })
  
        it('ordinal day of year', function () {
          var result = format(date, "Do 'dagen på året'", {locale: locale})
          assert(result === '95:e dagen på året')
        })
      })
  
      describe('week day', function () {
        it('day of week', function () {
          var result = format(date, 'E, EEEE, EEEEE, EEEEEE', {locale: locale})
          assert(result === 'lör, lördag, L, lö')
        })
  
        it('ordinal day of week', function () {
          var result = format(date, "eo 'dagen av veckan'", {locale: locale})
          assert(result === '6:e dagen av veckan')
        })
      })
  
      describe('day period and hour', function () {
        it('ordinal hour', function () {
          var result = format(date, "ho 'timmen'", {locale: locale})
          assert(result === '10:e timmen')
        })
  
        it('AM, PM', function () {
          var result = format(date, 'h a, h aaaa, haaaaa', {locale: locale})
          assert(result === '10 fm, 10 fm, 10fm')
        })
  
        it('AM, PM, noon, midnight', function () {
          var result = format(new Date(1986, 3 /* Apr */, 6, 0), 'b, bbbb', {locale: locale})
          assert(result === 'midnatt, midnatt')
        })
  
        it('flexible day periods', function () {
          it('works as expected', function () {
            var result = format(date, 'h B', {locale: locale})
            assert(result === '10 på morgonen')
          })
        })
      })
  
      it('ordinal minute', function () {
        var result = format(date, "mo 'minuten'", {locale: locale})
        assert(result === '32:a minuten')
      })
  
      it('ordinal second', function () {
        var result = format(date, "so 'sekunden'", {locale: locale})
        assert(result === '0:e sekunden')
      })
  
      describe('long format', function () {
        it('short date', function () {
          var result = format(date, 'P', {locale: locale})
          assert(result === '05-04-1986')
        })
  
        it('medium date', function () {
          var result = format(date, 'PP', {locale: locale})
          assert(result === '5 apr. 1986')
        })
  
        it('long date', function () {
          var result = format(date, 'PPP', {locale: locale})
          assert(result === '5 april 1986')
        })
  
        it('full date', function () {
          var result = format(date, 'PPPP', {locale: locale})
          assert(result === 'lördag 5 april 1986')
        })
  
        it('short time', function () {
          var result = format(date, 'p', {locale: locale})
          assert(result === '10:32')
        })
  
        it('medium time', function () {
          var result = format(date, 'pp', {locale: locale})
          assert(result === '10:32:00')
        })
  
        it('short date + time', function () {
          var result = format(date, 'Pp', {locale: locale})
          assert(result === '05-04-1986 10:32')
        })
  
        it('medium date + time', function () {
          var result = format(date, 'PPpp', {locale: locale})
          assert(result === '5 apr. 1986 10:32:00')
        })
  
        it('long date + time', function () {
          var result = format(date, 'PPPp', {locale: locale})
          assert(result === '5 april 1986 kl. 10:32')
        })
  
        it('full date + time', function () {
          var result = format(date, 'PPPPp', {locale: locale})
          assert(result === 'lördag 5 april 1986 kl. 10:32')
        })
      })
    })
  
    context('with `formatDistance`', function () {
      it('works as expected', function () {
        var result = formatDistance(
          new Date(1986, 3, 4, 10, 32, 25),
          new Date(1986, 3, 4, 10, 32, 0),
          {locale: locale, includeSeconds: true}
        )
        assert(result === 'en halv minut')
      })
  
      context('when `addSuffix` option is true', function () {
        it('adds a future suffix', function () {
          var result = formatDistance(
            new Date(1986, 3, 4, 10, 32, 7),
            new Date(1986, 3, 4, 10, 32, 0),
            {locale: locale, includeSeconds: true, addSuffix: true}
          )
          assert(result === 'om mindre än tio sekunder')
        })
  
        it('adds a past suffix', function () {
          var result = formatDistance(
            new Date(1986, 3, 4, 10, 32, 0),
            new Date(1986, 3, 4, 11, 32, 0),
            {locale: locale, addSuffix: true}
          )
          assert(result === 'ungefär en timme sedan')
        })
      })
    })
  
    context('with `formatDistanceStrict`', function () {
      it('works as expected', function () {
        var result = formatDistanceStrict(
          new Date(1986, 3, 4, 10, 32, 0),
          new Date(1986, 3, 4, 12, 32, 0),
          {locale: locale, unit: 'minute'}
        )
        assert(result === '120 minuter')
      })
  
      describe('when `addSuffix` option is true', function () {
        it('adds a future suffix', function () {
          var result = formatDistanceStrict(
            new Date(1986, 3, 4, 10, 32, 25),
            new Date(1986, 3, 4, 10, 32, 0),
            {locale: locale, addSuffix: true}
          )
          assert(result === 'om 25 sekunder')
        })
  
        it('adds a past suffix', function () {
          var result = formatDistanceStrict(
            new Date(1986, 3, 4, 10, 32, 0),
            new Date(1986, 3, 4, 11, 32, 0),
            {locale: locale, addSuffix: true}
          )
          assert(result === 'en timme sedan')
        })
      })
    })
  
    context('with `formatRelative`', function () {
      var baseDate = new Date(1986, 3 /* Apr */, 4, 10, 32, 0, 900)
  
      it('last week', function () {
        var result = formatRelative(new Date(1986, 3 /* Apr */, 1), baseDate, {locale: locale})
        assert(result === 'förra tisdagen kl. 00:00')
      })
  
      it('yesterday', function () {
        var result = formatRelative(new Date(1986, 3 /* Apr */, 3, 22, 22), baseDate, {locale: locale})
        assert(result === 'igår kl. 22:22')
      })
  
      it('today', function () {
        var result = formatRelative(new Date(1986, 3 /* Apr */, 4, 16, 50), baseDate, {locale: locale})
        assert(result === 'idag kl. 16:50')
      })
  
      it('tomorrow', function () {
        var result = formatRelative(new Date(1986, 3 /* Apr */, 5, 7, 30), baseDate, {locale: locale})
        assert(result === 'imorgon kl. 07:30')
      })
  
      it('next week', function () {
        var result = formatRelative(new Date(1986, 3 /* Apr */, 6, 12, 0), baseDate, {locale: locale})
        assert(result === 'söndag kl. 12:00')
      })
  
      it('after the next week', function () {
        var result = formatRelative(new Date(1986, 3 /* Apr */, 11, 16, 50), baseDate, {locale: locale})
        assert(result === '11-04-1986')
      })
    })
  
    context('with `parse`', function () {
      var baseDate = new Date(1986, 3 /* Apr */, 4, 10, 32, 0, 900)
  
      describe('era', function () {
        it('abbreviated', function () {
          var result = parse('10000 f.Kr.', 'yyyyy G', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(-9999, 0 /* Jan */, 1))
        })
  
        it('wide', function () {
          var result = parse('2018 efter Kristus', 'yyyy GGGG', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(2018, 0 /* Jan */, 1))
        })
  
        it('narrow', function () {
          var result = parse('44 f.Kr.', 'y GGGGG', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(-43, 0 /* Jan */, 1))
        })
      })
  
      it('ordinal year', function () {
        var result = parse('2017:e', 'yo', baseDate, {locale: locale})
        assert.deepEqual(result, new Date(2017, 0 /* Jan */, 1))
      })
  
      describe('quarter', function () {
        it('ordinal', function () {
          var result = parse('1:a', 'Qo', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 0 /* Jan */, 1))
        })
  
        it('abbreviated', function () {
          var result = parse('Q3', 'QQQ', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 6 /* Jul */, 1))
        })
  
        it('wide', function () {
          var result = parse('4:e kvartalet', 'QQQQ', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 9 /* Oct */, 1))
        })
  
        it('narrow', function () {
          var result = parse('1', 'QQQQQ', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 0 /* Jan */, 1))
        })
      })
  
      describe('month', function () {
        it('ordinal', function () {
          var result = parse('6:e', 'Mo', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 5 /* Jun */, 1))
        })
  
        it('abbreviated', function () {
          var result = parse('nov.', 'MMM', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 10 /* Nov */, 1))
        })
  
        it('wide', function () {
          var result = parse('februari', 'MMMM', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 1 /* Feb */, 1))
        })
  
        it('narrow', function () {
          var result = parse('J', 'MMMMM', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 0 /* Jan */, 1))
        })
      })
  
      it('ordinal week of year', function () {
        var result = parse('49:e', 'wo', baseDate, {locale: locale})
        assert.deepEqual(result, new Date(1986, 10 /* Nov */, 31))
      })
  
      it('ordinal day of month', function () {
        var result = parse('28:e', 'do', baseDate, {locale: locale})
        assert.deepEqual(result, new Date(1986, 3 /* Apr */, 28))
      })
  
      it('ordinal day of year', function () {
        var result = parse('200:e', 'Do', baseDate, {locale: locale})
        assert.deepEqual(result, new Date(1986, 6 /* Jul */, 19))
      })
  
      describe('day of week', function () {
        it('abbreviated', function () {
          var result = parse('mån', 'E', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 2 /* Mar */, 31))
        })
  
        it('wide', function () {
          var result = parse('tisdag', 'EEEE', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 1))
        })
  
        it('narrow', function () {
          var result = parse('O', 'EEEEE', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 2))
        })
  
        it('short', function () {
          var result = parse('to', 'EEEEEE', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 3))
        })
      })
  
      it('ordinal local day of week', function () {
        var result = parse('2:e day of the week', "eo 'day of the week'", baseDate, {locale: locale})
        assert.deepEqual(result, new Date(1986, 3 /* Apr */, 1))
      })
  
      describe('AM, PM', function () {
        it('abbreviated', function () {
          var result = parse('5 fm', 'h a', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 5))
        })
  
        it('wide', function () {
          var result = parse('5 em', 'h aaaa', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 17))
        })
  
        it('narrow', function () {
          var result = parse('11 fm', 'h aaaaa', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 11))
        })
      })
  
      describe('AM, PM, noon, midnight', function () {
        it('abbreviated', function () {
          var result = parse('middag', 'b', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 12))
        })
  
        it('wide', function () {
          var result = parse('midnatt', 'bbbb', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 0))
        })
  
        it('narrow', function () {
          var result = parse('midn', 'bbbbb', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 0))
        })
      })
  
      describe('flexible day period', function () {
        it('abbreviated', function () {
          var result = parse('02 på natten', 'HH B', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 2))
        })
  
        it('wide', function () {
          var result = parse('12 på eftermiddagen', 'HH BBBB', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 12))
        })
  
        it('narrow', function () {
          var result = parse('17 på kvällen', 'HH BBBBB', baseDate, {locale: locale})
          assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 17))
        })
      })
  
      it('ordinal time', function () {
        var dateString = '1:a timmen, 2:a minuten, 3:e sekunden'
        var formatString = "ho 'timmen', mo 'minuten', so 'sekunden'"
        var result = parse(dateString, formatString, baseDate, {locale: locale})
        assert.deepEqual(result, new Date(1986, 3 /* Apr */, 4, 1, 2, 3))
      })
    })
  })
  