import { UnitRecord } from '../DayFunctions' ; import { Locale , Locales } from '../Locale' ; const unitToWordSingular = { millis : 'milliseconde' , second : 'seconde' , minute : 'minuut' , hour : 'uur' , day : 'dag' , week : 'week' , month : 'maand' , quarter : 'kwartaal' , year : 'jaar' } ; const unitToWordPlural = { millis : 'milliseconden' , second : 'seconden' , minute : 'minuten' , hour : 'uur' , day : 'dagen' , week : 'weken' , month : 'maanden' , quarter : 'vertrekken' , year : 'jaar' } ; const lc = { weekStartsOn : 1 , firstWeekContainsDate : 4 , am : '' , pm : '' , formatLT : 'HH:mm' , formatLTS : 'HH:mm:ss' , formatL : 'DD-MM-Y' , formatl : 'D-M-Y' , formatLL : 'D MMMM Y' , formatll : 'D MMM Y' , formatLLL : 'D MMMM Y HH:mm' , formatlll : 'D MMM Y HH:mm' , formatLLLL : 'dddd D MMMM Y HH:mm' , formatllll : 'ddd D MMM Y HH:mm' , suffix : ( value ) => { return value + 'e' ; } , identifierTime : ( short ) => short ? 'lll' : 'LLL' , identifierDay : ( short ) => short ? 'll' : 'LL' , identifierWeek : ( short ) => 'wo [week van] Y' , identifierMonth : ( short ) => short ? 'MMM Y' : 'MMMM Y' , identifierQuarter : ( short ) => 'Qo [kwartaal] Y' , identifierYear : ( short ) => 'Y' , patternNone : ( ) => `Geen herhaling` , patternDaily : ( ) => `Dagelijks` , patternWeekly : ( day ) => `Wekelijks op ${ lc . weekdays [ 0 ] [ day . day ] }` , patternMonthlyWeek : ( day ) => `Maandelijks op de ${ lc . suffix ( day . weekspanOfMonth + 1 ) } ${ lc . weekdays [ 0 ] [ day . day ] }` , patternAnnually : ( day ) => `Jaarlijks op ${ day . dayOfMonth } ${ lc . months [ 0 ] [ day . month ] }` , patternAnnuallyMonthWeek : ( day ) => `Jaarlijks op de ${ lc . suffix ( day . weekspanOfMonth + 1 ) } ${ lc . weekdays [ 0 ] [ day . day ] } van ${ lc . months [ 0 ] [ day . month ] }` , patternWeekday : ( ) => 'Iedere werkdag (maandag tot vrijdag)' , patternMonthly : ( day ) => `Maandelijks op de ${ lc . suffix ( day . dayOfMonth ) }` , patternLastDay : ( ) => `Laatste dag van de maand` , patternLastDayOfMonth : ( day ) => `Laatste dag van ${ lc . months [ 0 ] [ day . month ] }` , patternLastWeekday : ( day ) => `Laatste ${ lc . weekdays [ 0 ] [ day . day ] } van ${ lc . months [ 0 ] [ day . month ] }` , patternCustom : ( ) => `Aangepast...` , scheduleStartingOn : ( start ) => `Vanaf ${ start . dayOfMonth } ${ lc . months [ 0 ] [ start . month ] } ${ start . year }` , scheduleEndingOn : ( end ) => `tot en met ${ end . dayOfMonth } ${ lc . months [ 0 ] [ end . month ] } ${ end . year }` , scheduleEndsOn : ( end ) => `Tot en met ${ end . dayOfMonth } ${ lc . months [ 0 ] [ end . month ] } ${ end . year }` , scheduleThing : ( thing , start ) => start ? 'Zal het ' + thing + ' plaatsvinden' : ' zal het ' + thing + ' plaatsvinden' , scheduleAtTimes : ' om ' , scheduleDuration : ( duration , unit ) => ' gedurende ' + duration + ' ' + ( unit ? ( duration !== 1 ? unitToWordPlural [ unit ] : unitToWordSingular [ unit ] ) + ' ' : '' ) , scheduleExcludes : ' met uitzondering van ' , scheduleIncludes : ' inclusief ' , scheduleCancels : ' met annuleringen op ' , ruleDayOfWeek : { every : ( every ) => `iedere ${ lc . suffix ( every ) } dag van de week` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } dag van de week` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } dag van de week` } , ruleLastDayOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every ) } laatste dag van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } laatste dag van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } laatste dag van de maand` } , ruleDayOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every ) } dag van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } dag van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } dag van de maand` } , ruleDayOfYear : { every : ( every ) => `iedere ${ lc . suffix ( every ) } dag van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset + 1 ) } dag van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } dag van het jaar` } , ruleYear : { every : ( every ) => `iedere ${ lc . suffix ( every ) } jaar` , offset : ( offset ) => `vanaf ${ offset }` , oneOf : ( values ) => `in ${ lc . list ( values . map ( x => x . toString ( ) ) ) }` } , ruleMonth : { every : ( every ) => `iedere ${ lc . suffix ( every ) } maand` , offset : ( offset ) => `vanaf ${ lc . months [ 0 ] [ offset ] }` , oneOf : ( values ) => `in ${ lc . list ( values . map ( x => lc . months [ 0 ] [ x ] ) ) }` } , ruleDay : { every : ( every ) => `iedere ${ lc . suffix ( every ) } dag van de week` , offset : ( offset ) => `vanaf ${ lc . weekdays [ 0 ] [ offset ] }` , oneOf : ( values ) => `on ${ lc . list ( values . map ( v => lc . weekdays [ 0 ] [ v ] ) ) }` } , ruleWeek : { every : ( every ) => `iedere ${ lc . suffix ( every ) } week van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } week van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } week van het jaar` } , ruleWeekOfYear : { every : ( every ) => `iedere ${ lc . suffix ( every ) } week van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } week van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } week van het jaar` } , ruleWeekspanOfYear : { every : ( every ) => `iedere ${ lc . suffix ( every + 1 ) } weekspanne van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset + 1 ) } weekspanne van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( x => lc . suffix ( x + 1 ) ) ) } weekspanne van het jaar` } , ruleFullWeekOfYear : { every : ( every ) => `iedere ${ lc . suffix ( every ) } hele week van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } hele week van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } hele week van het jaar` } , ruleLastWeekspanOfYear : { every : ( every ) => `iedere ${ lc . suffix ( every + 1 ) } laatste weekspanne van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset + 1 ) } laatste weekspanne van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( x => lc . suffix ( x + 1 ) ) ) } last weekspan van het jaar` } , ruleLastFullWeekOfYear : { every : ( every ) => `iedere ${ lc . suffix ( every ) } laatste hele week van het jaar` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } laatste hele week van het jaar` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } laatste hele week van het jaar` } , ruleWeekOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every ) } week van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } week van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } week van de maand` } , ruleFullWeekOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every ) } hele week van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } hele week van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } hele week van de maand` } , ruleWeekspanOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every + 1 ) } weekspanne van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset + 1 ) } weekspanne van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( x => lc . suffix ( x + 1 ) ) ) } weekspanne van de maand` } , ruleLastFullWeekOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every ) } laatste hele week van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset ) } laatste hele week van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( lc . suffix ) ) } laatste hele week van de maand` } , ruleLastWeekspanOfMonth : { every : ( every ) => `iedere ${ lc . suffix ( every + 1 ) } laatste weekspanne van de maand` , offset : ( offset ) => `vanaf de ${ lc . suffix ( offset + 1 ) } laatste weekspanne van de maand` , oneOf : ( values ) => `op de ${ lc . list ( values . map ( x => lc . suffix ( x + 1 ) ) ) } last weekspanne van de maand` } , summaryDay : ( short , dayOfWeek , year ) => ( dayOfWeek ? ( short ? 'ddd ' : 'dddd ' ) : '' ) + 'D ' + ( short ? 'MMM ' : 'MMMM ' ) + ( year ? 'Y' : '' ) , summaryWeek : ( short , dayOfWeek , year ) => ( dayOfWeek ? ( short ? 'ddd ' : 'dddd ' ) : '' ) + 'D ' + ( short ? 'MMM ' : 'MMMM ' ) + ( year ? 'Y' : '' ) , summaryMonth : ( short , dayOfWeek , year ) => ( short ? 'MMM' : 'MMMM' ) + ( year ? ' YYYY' : '' ) , summaryYear : ( short , dayOfWeek , year ) => ( year ? 'YYYY' : '' ) , list : ( items ) => { const last = items . length - 1 ; let out = items [ 0 ] ; for ( let i = 1 ; i < last ; i ++ ) { out += ', ' + items [ i ] ; } if ( last > 0 ) { out += ' en ' + items [ last ] ; } return out ; } , months : [ [ 'januari' , 'februari' , 'maart' , 'april' , 'mei' , 'juni' , 'juli' , 'augustus' , 'september' , 'oktober' , 'november' , 'december' ] , [ 'jan' , 'feb' , 'mrt' , 'apr' , 'mei' , 'jun' , 'jul' , 'aug' , 'sept' , 'okt' , 'nov' , 'dec' ] , [ 'jan' , 'feb' , 'mrt' , 'apr' , 'mei' , 'jun' , 'jul' , 'aug' , 'sept' , 'okt' , 'nov' , 'dec' ] , [ 'J' , 'F' , 'M' , 'A' , 'M' , 'J' , 'J' , 'A' , 'S' , 'O' , 'N' , 'D' ] ] , weekdays : [ [ 'zondag' , 'maandag' , 'dinsdag' , 'woensdag' , 'donderdag' , 'vrijdag' , 'zaterdag' ] , [ 'zon' , 'maan' , 'din' , 'woen' , 'don' , 'vrij' , 'zat' ] , [ 'zon' , 'maa' , 'din' , 'woe' , 'don' , 'vrij' , 'zat' ] , [ 'zo' , 'ma' , 'di' , 'wo' , 'do' , 'vr' , 'za' ] , ] , } ; export default lc ; Locales . add ( [ 'nl' , 'nl-be' ] , lc ) ;