Skip to content

Commit

Permalink
Changed variable name to 'locale' as suggested in PR #350
Browse files Browse the repository at this point in the history
  • Loading branch information
KristjanESPERANTO authored Nov 13, 2020
1 parent 6389f3e commit 0d413cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/simple_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ <h1>Nothing to see here, open a debug console in your browser to see the interes
let input_value = 'Mo-Tu,Do-Fr 10:00-20:00; Samstag und Sonntag geschlossen';

// Language for the warnings (get it from the browser settings).
let warnings_language = navigator.language.split('-')[0];
let locale = navigator.language.split('-')[0];

// Create opening_hours object.
let oh = new opening_hours(input_value, {}, { 'locale': warnings_language });
let oh = new opening_hours(input_value, {}, { 'locale': locale });

// Prettify the value in different languages.
let prettified_value_de = oh.prettifyValue({conf: { locale: 'de' },});
Expand Down

0 comments on commit 0d413cd

Please sign in to comment.