opening_hours 3.12.0 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "commonjs",
4
4
  "types": "./types/index.d.ts",
5
5
  "description": "Library to parse and process opening_hours tag from OpenStreetMap data",
6
- "version": "3.12.0",
6
+ "version": "3.13.0",
7
7
  "main": "./build/opening_hours.js",
8
8
  "module": "./build/opening_hours.esm.mjs",
9
9
  "sideEffects": false,
@@ -66,38 +66,38 @@
66
66
  "check-updates": "npm-check-updates --upgrade"
67
67
  },
68
68
  "dependencies": {
69
- "i18next": "^25.8.13",
69
+ "i18next": "^26.1.0",
70
70
  "suncalc": "^1.9.0"
71
71
  },
72
72
  "devDependencies": {
73
- "@commitlint/cli": "^20.4.2",
74
- "@commitlint/config-conventional": "^20.4.2",
75
- "@eslint/js": "^9.32.0",
76
- "@eslint/markdown": "^7.5.1",
77
- "@rollup/plugin-commonjs": "^29.0.0",
73
+ "@commitlint/cli": "^21.0.0",
74
+ "@commitlint/config-conventional": "^21.0.0",
75
+ "@eslint/js": "^10.0.1",
76
+ "@eslint/markdown": "^8.0.1",
77
+ "@rollup/plugin-commonjs": "^29.0.2",
78
78
  "@rollup/plugin-json": "^6.1.0",
79
79
  "@rollup/plugin-node-resolve": "^16.0.3",
80
- "@rollup/plugin-terser": "^0.4.4",
80
+ "@rollup/plugin-terser": "^1.0.0",
81
81
  "@rollup/plugin-yaml": "^4.1.2",
82
- "@stylistic/eslint-plugin": "^5.9.0",
83
- "commit-and-tag-version": "^12.6.1",
82
+ "@stylistic/eslint-plugin": "^5.10.0",
83
+ "commit-and-tag-version": "^12.7.3",
84
84
  "commitizen": "^4.3.1",
85
85
  "cz-conventional-changelog": "^3.3.0",
86
- "doctoc": "^2.3.0",
87
- "eslint": "^9.32.0",
86
+ "doctoc": "^2.4.1",
87
+ "eslint": "^10.3.0",
88
88
  "full-icu": "^1.5.0",
89
89
  "glob": "^13.0.6",
90
- "globals": "^17.4.0",
90
+ "globals": "^17.6.0",
91
91
  "husky": "^9.1.7",
92
- "lint-staged": "^16.3.1",
93
- "npm-check-updates": "^19.6.3",
92
+ "lint-staged": "^17.0.4",
93
+ "npm-check-updates": "^22.1.1",
94
94
  "package-json-validator-cli": "^0.1.11",
95
- "rollup": "^4.59.0",
96
- "terser": "^5.46.0",
95
+ "rollup": "^4.60.3",
96
+ "terser": "^5.47.1",
97
97
  "timekeeper": "^2.3.1",
98
- "typescript": "^5.9.3",
99
- "typescript-eslint": "^8.56.1",
100
- "yaml": "^2.8.2",
98
+ "typescript": "^6.0.3",
99
+ "typescript-eslint": "^8.59.3",
100
+ "yaml": "^2.9.0",
101
101
  "yargs": "^18.0.0"
102
102
  },
103
103
  "engines": {
@@ -1,4 +1,8 @@
1
1
  /*
2
+ * SPDX-FileCopyrightText: © 2015 Robin Schneider <ypid@riseup.net>
3
+ *
4
+ * SPDX-License-Identifier: LGPL-3.0-only
5
+ *
2
6
  * Upstream source: https://wiki.openstreetmap.org/wiki/Nominatim/Country_Codes
3
7
  */
4
8
  export const countryToLanguageMapping = {
@@ -1,5 +1,10 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2014 Robin Schneider <ypid@riseup.net>
3
+ *
4
+ * SPDX-License-Identifier: LGPL-3.0-only
5
+ */
1
6
  // Import dependencies
2
- import i18next from '../../node_modules/i18next/dist/esm/i18next.bundled.js';
7
+ import i18next from '../../node_modules/i18next/dist/esm/i18next.js';
3
8
  import { OpeningHoursTable } from './opening_hours_table.js';
4
9
  import { mapCountryToLanguage } from './countryToLanguageMapping.js';
5
10
  import { updateTimeButtonLabels } from './main.js';
@@ -46,15 +51,18 @@ export function josm(url_param) {
46
51
  }
47
52
  // }}}
48
53
 
49
- // add calculation for calendar week to date {{{
50
- export function dateAtWeek(date, week) {
51
- const minutes_in_day = 60 * 24;
52
- const msec_in_day = 1000 * 60 * minutes_in_day;
53
- const msec_in_week = msec_in_day * 7;
54
+ // ISO 8601 calendar week number {{{
55
+ export function getISOWeekNumber(date) {
56
+ const millisecondsPerDay = 24 * 60 * 60 * 1000;
57
+ const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
58
+
59
+ // ISO week uses Monday=1..Sunday=7 and anchors weeks on Thursday.
60
+ const isoDay = utcDate.getUTCDay() || 7;
61
+ utcDate.setUTCDate(utcDate.getUTCDate() + 4 - isoDay);
54
62
 
55
- const tmpdate = new Date(date.getFullYear(), 0, 1);
56
- tmpdate.setDate(1 - (tmpdate.getDay() + 6) % 7 + week * 7); // start of week n where week starts on Monday
57
- return Math.floor((date - tmpdate) / msec_in_week);
63
+ const isoYearStart = new Date(Date.UTC(utcDate.getUTCFullYear(), 0, 1));
64
+ const dayOfYear = Math.floor((utcDate - isoYearStart) / millisecondsPerDay) + 1;
65
+ return Math.ceil(dayOfYear / 7);
58
66
  }
59
67
  // }}}
60
68
 
@@ -1,5 +1,10 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2013 Robin Schneider <ypid@riseup.net>
3
+ *
4
+ * SPDX-License-Identifier: LGPL-3.0-only
5
+ */
1
6
  // Import i18next for use in helper functions
2
- import i18next from '../../node_modules/i18next/dist/esm/i18next.bundled.js';
7
+ import i18next from '../../node_modules/i18next/dist/esm/i18next.js';
3
8
 
4
9
  // localization {{{
5
10
  export const resources = { // English is fallback language.
package/site/js/main.js CHANGED
@@ -1,7 +1,12 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2025 Kristjan ESPERANTO <https://github.com/KristjanESPERANTO>
3
+ *
4
+ * SPDX-License-Identifier: LGPL-3.0-only
5
+ */
1
6
  // Import all required modules
2
- import i18next from '../../node_modules/i18next/dist/esm/i18next.bundled.js';
7
+ import i18next from '../../node_modules/i18next/dist/esm/i18next.js';
3
8
  import { resources, detectLanguage, getUserSelectTranslateHTMLCode, changeLanguage } from './i18n-resources.js';
4
- import { Evaluate, EX, josm, toggle, dateAtWeek, newValue, currentDateTime } from './helpers.js';
9
+ import { Evaluate, EX, josm, toggle, getISOWeekNumber, newValue, currentDateTime } from './helpers.js';
5
10
 
6
11
  // Configuration constants
7
12
  window.default_lat = 48.7769;
@@ -72,7 +77,7 @@ export function updateTimeButtonLabels(date) {
72
77
  if (minuteLabel) minuteLabel.textContent = u2(currentDateTime.minute);
73
78
 
74
79
  if (weekLabel && date) {
75
- weekLabel.textContent = `W${u2(dateAtWeek(date, 0) + 1)}`;
80
+ weekLabel.textContent = `W${u2(getISOWeekNumber(date))}`;
76
81
  }
77
82
 
78
83
  if (wdayDisplay && date) {
@@ -1,5 +1,10 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2013 Robin Schneider <ypid@riseup.net>
3
+ *
4
+ * SPDX-License-Identifier: LGPL-3.0-only
5
+ */
1
6
  // Import dependencies
2
- import i18next from '../../node_modules/i18next/dist/esm/i18next.bundled.js';
7
+ import i18next from '../../node_modules/i18next/dist/esm/i18next.js';
3
8
 
4
9
  export const OpeningHoursTable = {
5
10
 
@@ -12,6 +17,16 @@ export const OpeningHoursTable = {
12
17
  return date.toLocaleString(i18next.language, { weekday: 'short' });
13
18
  },
14
19
 
20
+ // Returns a date's local time as a percentage of the day (0–100).
21
+ dayPercent(date) {
22
+ return (date.getHours() * 60 + date.getMinutes()) / 1440 * 100;
23
+ },
24
+
25
+ // Formats a date's local time as "HH:MM".
26
+ formatHM(date) {
27
+ return date.toLocaleString('en', { hourCycle: 'h23', hour: '2-digit', minute: '2-digit' });
28
+ },
29
+
15
30
  formatdate (now, nextchange, from) {
16
31
  const now_daystart = new Date(now.getFullYear(), now.getMonth(), now.getDate());
17
32
  const nextdays = (nextchange.getTime() - now_daystart.getTime()) / 1000 / 60 / 60 / 24;
@@ -113,7 +128,7 @@ export const OpeningHoursTable = {
113
128
  // Calculate current time position for "now" marker (percentage of day)
114
129
  // Use evalDate instead of new Date() to show the evaluation time, not browser time
115
130
  const now = evalDate || new Date();
116
- const nowPercent = ((now.getHours() * 60 + now.getMinutes()) / (24 * 60)) * 100;
131
+ const nowPercent = this.dayPercent(now);
117
132
 
118
133
  const tableData = [];
119
134
 
@@ -137,30 +152,23 @@ export const OpeningHoursTable = {
137
152
  while (has_next_change && it.advance() && curdate.getTime() - date.getTime() < 24 * 60 * 60 * 1000) {
138
153
  curdate = it.getDate();
139
154
 
140
- let fr = prevdate.getTime() - date.getTime();
141
- let to = curdate.getTime() - date.getTime();
155
+ // Use local clock time (not elapsed ms) so bars stay aligned
156
+ // with labels on DST transition days.
157
+ const crossesMidnight = prevdate.getDay() !== curdate.getDay();
142
158
 
143
- if (to > 24 * 60 * 60 * 1000) {
144
- to = 24 * 60 * 60 * 1000;
145
- }
146
-
147
- fr *= 100 / 1000 / 60 / 60 / 24;
148
- to *= 100 / 1000 / 60 / 60 / 24;
159
+ const from = this.dayPercent(prevdate);
160
+ const to = crossesMidnight ? 100 : this.dayPercent(curdate);
149
161
 
150
162
  const stateClass = is_open ? 'open' : (unknown ? 'unknown' : 'closed');
151
- // Always use 24h format with HH:MM
152
- const timeFrom = `${String(prevdate.getHours()).padStart(2, '0')}:${String(prevdate.getMinutes()).padStart(2, '0')}`;
153
- const timeToDate = prevdate.getDay() !== curdate.getDay() ? null : curdate;
154
- const timeTo = timeToDate
155
- ? `${String(timeToDate.getHours()).padStart(2, '0')}:${String(timeToDate.getMinutes()).padStart(2, '0')}`
156
- : '24:00';
163
+ const timeFrom = this.formatHM(prevdate);
164
+ const timeTo = crossesMidnight ? '24:00' : this.formatHM(curdate);
157
165
 
158
166
  // Use current state_string for this period (before advancing)
159
167
  const currentStateString = state_string;
160
168
  const tooltip = `${i18next.t(`words.${currentStateString}`)}: ${timeFrom} - ${timeTo}`;
161
169
 
162
170
  rowData.times.push(
163
- `<div class="timebar ${stateClass}" style="width:${to - fr}%" title="${tooltip}"></div>`
171
+ `<div class="timebar ${stateClass}" style="width:${to - from}%" title="${tooltip}"></div>`
164
172
  );
165
173
 
166
174
  if (is_open || unknown) {
@@ -232,14 +240,6 @@ export const OpeningHoursTable = {
232
240
  return `<table class="opening-hours-table">${headerRow}${rows}</table>`;
233
241
  },
234
242
 
235
- getReadableState (startString, endString, oh, past) {
236
- if (past === true) past = 'd';
237
- else past = '';
238
-
239
- const output = '';
240
- return `${startString + output + endString}.`;
241
- },
242
-
243
243
  drawTableAndComments (oh, it, evalDate) {
244
244
  const prevdate = it.getDate();
245
245
  const unknown = it.getUnknown();
@@ -357,10 +357,7 @@ export const OpeningHoursTable = {
357
357
  const change_daystart = new Date(changeDate.getFullYear(), changeDate.getMonth(), changeDate.getDate());
358
358
  const daysDiff = Math.round((change_daystart.getTime() - now_daystart.getTime()) / (1000 * 60 * 60 * 24));
359
359
 
360
- // Always use 24h format with HH:MM
361
- const hours = String(changeDate.getHours()).padStart(2, '0');
362
- const minutes = String(changeDate.getMinutes()).padStart(2, '0');
363
- const timeStr = `${hours}:${minutes}`;
360
+ const timeStr = this.formatHM(changeDate);
364
361
 
365
362
  if (daysDiff === 0) {
366
363
  return `${i18next.t('words.today')} ${timeStr}`;
package/site/js/theme.js CHANGED
@@ -44,12 +44,8 @@
44
44
  const theme = getThemePreference();
45
45
  setTheme(theme);
46
46
 
47
- // Set up toggle button when DOM is ready
48
- if (document.readyState === 'loading') {
49
- document.addEventListener('DOMContentLoaded', initToggleButton);
50
- } else {
51
- initToggleButton();
52
- }
47
+ // Set up toggle button (script loads with defer, so DOM is ready)
48
+ initToggleButton();
53
49
 
54
50
  function initToggleButton() {
55
51
  const toggleBtn = document.getElementById('theme-toggle');
@@ -1,4 +1,7 @@
1
1
  /*
2
+ * SPDX-FileCopyrightText: Adrien PAVIE
3
+ * SPDX-License-Identifier: AGPL-3.0-or-later
4
+ *
2
5
  * This file is part of YoHours.
3
6
  *
4
7
  * YoHours is free software: you can redistribute it and/or modify
@@ -1,3 +1,8 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2025 Kristjan ESPERANTO <https://github.com/KristjanESPERANTO>
3
+ *
4
+ * SPDX-License-Identifier: LGPL-3.0-only
5
+ */
1
6
  import opening_hours_resources from './opening_hours_resources.yaml';
2
7
 
3
8
  const resources = opening_hours_resources;
@@ -1,349 +0,0 @@
1
- Creative Commons Attribution-ShareAlike 4.0 International
2
-
3
- Creative Commons Corporation (“Creative Commons”) is not a law firm and does
4
- not provide legal services or legal advice. Distribution of Creative Commons
5
- public licenses does not create a lawyer-client or other relationship. Creative
6
- Commons makes its licenses and related information available on an “as-is”
7
- basis. Creative Commons gives no warranties regarding its licenses, any material
8
- licensed under their terms and conditions, or any related information. Creative
9
- Commons disclaims all liability for damages resulting from their use to the
10
- fullest extent possible.
11
-
12
- Using Creative Commons Public Licenses
13
-
14
- Creative Commons public licenses provide a standard set of terms and conditions
15
- that creators and other rights holders may use to share original works of
16
- authorship and other material subject to copyright and certain other rights
17
- specified in the public license below. The following considerations are for
18
- informational purposes only, are not exhaustive, and do not form part of our
19
- licenses.
20
-
21
- Considerations for licensors: Our public licenses are intended for use by
22
- those authorized to give the public permission to use material in ways otherwise
23
- restricted by copyright and certain other rights. Our licenses are irrevocable.
24
- Licensors should read and understand the terms and conditions of the license
25
- they choose before applying it. Licensors should also secure all rights necessary
26
- before applying our licenses so that the public can reuse the material as
27
- expected. Licensors should clearly mark any material not subject to the license.
28
- This includes other CC-licensed material, or material used under an exception
29
- or limitation to copyright. More considerations for licensors.
30
-
31
- Considerations for the public: By using one of our public licenses, a licensor
32
- grants the public permission to use the licensed material under specified
33
- terms and conditions. If the licensor’s permission is not necessary for any
34
- reason–for example, because of any applicable exception or limitation to copyright–then
35
- that use is not regulated by the license. Our licenses grant only permissions
36
- under copyright and certain other rights that a licensor has authority to
37
- grant. Use of the licensed material may still be restricted for other reasons,
38
- including because others have copyright or other rights in the material. A
39
- licensor may make special requests, such as asking that all changes be marked
40
- or described.
41
-
42
- Although not required by our licenses, you are encouraged to respect those
43
- requests where reasonable. More considerations for the public.
44
-
45
- Creative Commons Attribution-ShareAlike 4.0 International Public License
46
-
47
- By exercising the Licensed Rights (defined below), You accept and agree to
48
- be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike
49
- 4.0 International Public License ("Public License"). To the extent this Public
50
- License may be interpreted as a contract, You are granted the Licensed Rights
51
- in consideration of Your acceptance of these terms and conditions, and the
52
- Licensor grants You such rights in consideration of benefits the Licensor
53
- receives from making the Licensed Material available under these terms and
54
- conditions.
55
-
56
- Section 1 – Definitions.
57
-
58
- a. Adapted Material means material subject to Copyright and Similar Rights
59
- that is derived from or based upon the Licensed Material and in which the
60
- Licensed Material is translated, altered, arranged, transformed, or otherwise
61
- modified in a manner requiring permission under the Copyright and Similar
62
- Rights held by the Licensor. For purposes of this Public License, where the
63
- Licensed Material is a musical work, performance, or sound recording, Adapted
64
- Material is always produced where the Licensed Material is synched in timed
65
- relation with a moving image.
66
-
67
- b. Adapter's License means the license You apply to Your Copyright and Similar
68
- Rights in Your contributions to Adapted Material in accordance with the terms
69
- and conditions of this Public License.
70
-
71
- c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses,
72
- approved by Creative Commons as essentially the equivalent of this Public
73
- License.
74
-
75
- d. Copyright and Similar Rights means copyright and/or similar rights closely
76
- related to copyright including, without limitation, performance, broadcast,
77
- sound recording, and Sui Generis Database Rights, without regard to how the
78
- rights are labeled or categorized. For purposes of this Public License, the
79
- rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
80
-
81
- e. Effective Technological Measures means those measures that, in the absence
82
- of proper authority, may not be circumvented under laws fulfilling obligations
83
- under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
84
- and/or similar international agreements.
85
-
86
- f. Exceptions and Limitations means fair use, fair dealing, and/or any other
87
- exception or limitation to Copyright and Similar Rights that applies to Your
88
- use of the Licensed Material.
89
-
90
- g. License Elements means the license attributes listed in the name of a Creative
91
- Commons Public License. The License Elements of this Public License are Attribution
92
- and ShareAlike.
93
-
94
- h. Licensed Material means the artistic or literary work, database, or other
95
- material to which the Licensor applied this Public License.
96
-
97
- i. Licensed Rights means the rights granted to You subject to the terms and
98
- conditions of this Public License, which are limited to all Copyright and
99
- Similar Rights that apply to Your use of the Licensed Material and that the
100
- Licensor has authority to license.
101
-
102
- j. Licensor means the individual(s) or entity(ies) granting rights under this
103
- Public License.
104
-
105
- k. Share means to provide material to the public by any means or process that
106
- requires permission under the Licensed Rights, such as reproduction, public
107
- display, public performance, distribution, dissemination, communication, or
108
- importation, and to make material available to the public including in ways
109
- that members of the public may access the material from a place and at a time
110
- individually chosen by them.
111
-
112
- l. Sui Generis Database Rights means rights other than copyright resulting
113
- from Directive 96/9/EC of the European Parliament and of the Council of 11
114
- March 1996 on the legal protection of databases, as amended and/or succeeded,
115
- as well as other essentially equivalent rights anywhere in the world.
116
-
117
- m. You means the individual or entity exercising the Licensed Rights under
118
- this Public License. Your has a corresponding meaning.
119
-
120
- Section 2 – Scope.
121
-
122
- a. License grant.
123
-
124
- 1. Subject to the terms and conditions of this Public License, the Licensor
125
- hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
126
- irrevocable license to exercise the Licensed Rights in the Licensed Material
127
- to:
128
-
129
- A. reproduce and Share the Licensed Material, in whole or in part; and
130
-
131
- B. produce, reproduce, and Share Adapted Material.
132
-
133
- 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
134
- and Limitations apply to Your use, this Public License does not apply, and
135
- You do not need to comply with its terms and conditions.
136
-
137
- 3. Term. The term of this Public License is specified in Section 6(a).
138
-
139
- 4. Media and formats; technical modifications allowed. The Licensor authorizes
140
- You to exercise the Licensed Rights in all media and formats whether now known
141
- or hereafter created, and to make technical modifications necessary to do
142
- so. The Licensor waives and/or agrees not to assert any right or authority
143
- to forbid You from making technical modifications necessary to exercise the
144
- Licensed Rights, including technical modifications necessary to circumvent
145
- Effective Technological Measures. For purposes of this Public License, simply
146
- making modifications authorized by this Section 2(a)(4) never produces Adapted
147
- Material.
148
-
149
- 5. Downstream recipients.
150
-
151
- A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed
152
- Material automatically receives an offer from the Licensor to exercise the
153
- Licensed Rights under the terms and conditions of this Public License.
154
-
155
- B. Additional offer from the Licensor – Adapted Material. Every recipient
156
- of Adapted Material from You automatically receives an offer from the Licensor
157
- to exercise the Licensed Rights in the Adapted Material under the conditions
158
- of the Adapter’s License You apply.
159
-
160
- C. No downstream restrictions. You may not offer or impose any additional
161
- or different terms or conditions on, or apply any Effective Technological
162
- Measures to, the Licensed Material if doing so restricts exercise of the Licensed
163
- Rights by any recipient of the Licensed Material.
164
-
165
- 6. No endorsement. Nothing in this Public License constitutes or may be construed
166
- as permission to assert or imply that You are, or that Your use of the Licensed
167
- Material is, connected with, or sponsored, endorsed, or granted official status
168
- by, the Licensor or others designated to receive attribution as provided in
169
- Section 3(a)(1)(A)(i).
170
-
171
- b. Other rights.
172
-
173
- 1. Moral rights, such as the right of integrity, are not licensed under this
174
- Public License, nor are publicity, privacy, and/or other similar personality
175
- rights; however, to the extent possible, the Licensor waives and/or agrees
176
- not to assert any such rights held by the Licensor to the limited extent necessary
177
- to allow You to exercise the Licensed Rights, but not otherwise.
178
-
179
- 2. Patent and trademark rights are not licensed under this Public License.
180
-
181
- 3. To the extent possible, the Licensor waives any right to collect royalties
182
- from You for the exercise of the Licensed Rights, whether directly or through
183
- a collecting society under any voluntary or waivable statutory or compulsory
184
- licensing scheme. In all other cases the Licensor expressly reserves any right
185
- to collect such royalties.
186
-
187
- Section 3 – License Conditions.
188
-
189
- Your exercise of the Licensed Rights is expressly made subject to the following
190
- conditions.
191
-
192
- a. Attribution.
193
-
194
- 1. If You Share the Licensed Material (including in modified form), You must:
195
-
196
- A. retain the following if it is supplied by the Licensor with the Licensed
197
- Material:
198
-
199
- i. identification of the creator(s) of the Licensed Material and any others
200
- designated to receive attribution, in any reasonable manner requested by the
201
- Licensor (including by pseudonym if designated);
202
-
203
- ii. a copyright notice;
204
-
205
- iii. a notice that refers to this Public License;
206
-
207
- iv. a notice that refers to the disclaimer of warranties;
208
-
209
- v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
210
-
211
- B. indicate if You modified the Licensed Material and retain an indication
212
- of any previous modifications; and
213
-
214
- C. indicate the Licensed Material is licensed under this Public License, and
215
- include the text of, or the URI or hyperlink to, this Public License.
216
-
217
- 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
218
- based on the medium, means, and context in which You Share the Licensed Material.
219
- For example, it may be reasonable to satisfy the conditions by providing a
220
- URI or hyperlink to a resource that includes the required information.
221
-
222
- 3. If requested by the Licensor, You must remove any of the information required
223
- by Section 3(a)(1)(A) to the extent reasonably practicable.
224
-
225
- b. ShareAlike.In addition to the conditions in Section 3(a), if You Share
226
- Adapted Material You produce, the following conditions also apply.
227
-
228
- 1. The Adapter’s License You apply must be a Creative Commons license with
229
- the same License Elements, this version or later, or a BY-SA Compatible License.
230
-
231
- 2. You must include the text of, or the URI or hyperlink to, the Adapter's
232
- License You apply. You may satisfy this condition in any reasonable manner
233
- based on the medium, means, and context in which You Share Adapted Material.
234
-
235
- 3. You may not offer or impose any additional or different terms or conditions
236
- on, or apply any Effective Technological Measures to, Adapted Material that
237
- restrict exercise of the rights granted under the Adapter's License You apply.
238
-
239
- Section 4 – Sui Generis Database Rights.
240
-
241
- Where the Licensed Rights include Sui Generis Database Rights that apply to
242
- Your use of the Licensed Material:
243
-
244
- a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
245
- reuse, reproduce, and Share all or a substantial portion of the contents of
246
- the database;
247
-
248
- b. if You include all or a substantial portion of the database contents in
249
- a database in which You have Sui Generis Database Rights, then the database
250
- in which You have Sui Generis Database Rights (but not its individual contents)
251
- is Adapted Material, including for purposes of Section 3(b); and
252
-
253
- c. You must comply with the conditions in Section 3(a) if You Share all or
254
- a substantial portion of the contents of the database.
255
- For the avoidance of doubt, this Section 4 supplements and does not replace
256
- Your obligations under this Public License where the Licensed Rights include
257
- other Copyright and Similar Rights.
258
-
259
- Section 5 – Disclaimer of Warranties and Limitation of Liability.
260
-
261
- a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
262
- the Licensor offers the Licensed Material as-is and as-available, and makes
263
- no representations or warranties of any kind concerning the Licensed Material,
264
- whether express, implied, statutory, or other. This includes, without limitation,
265
- warranties of title, merchantability, fitness for a particular purpose, non-infringement,
266
- absence of latent or other defects, accuracy, or the presence or absence of
267
- errors, whether or not known or discoverable. Where disclaimers of warranties
268
- are not allowed in full or in part, this disclaimer may not apply to You.
269
-
270
- b. To the extent possible, in no event will the Licensor be liable to You
271
- on any legal theory (including, without limitation, negligence) or otherwise
272
- for any direct, special, indirect, incidental, consequential, punitive, exemplary,
273
- or other losses, costs, expenses, or damages arising out of this Public License
274
- or use of the Licensed Material, even if the Licensor has been advised of
275
- the possibility of such losses, costs, expenses, or damages. Where a limitation
276
- of liability is not allowed in full or in part, this limitation may not apply
277
- to You.
278
-
279
- c. The disclaimer of warranties and limitation of liability provided above
280
- shall be interpreted in a manner that, to the extent possible, most closely
281
- approximates an absolute disclaimer and waiver of all liability.
282
-
283
- Section 6 – Term and Termination.
284
-
285
- a. This Public License applies for the term of the Copyright and Similar Rights
286
- licensed here. However, if You fail to comply with this Public License, then
287
- Your rights under this Public License terminate automatically.
288
-
289
- b. Where Your right to use the Licensed Material has terminated under Section
290
- 6(a), it reinstates:
291
-
292
- 1. automatically as of the date the violation is cured, provided it is cured
293
- within 30 days of Your discovery of the violation; or
294
-
295
- 2. upon express reinstatement by the Licensor.
296
-
297
- c. For the avoidance of doubt, this Section 6(b) does not affect any right
298
- the Licensor may have to seek remedies for Your violations of this Public
299
- License.
300
-
301
- d. For the avoidance of doubt, the Licensor may also offer the Licensed Material
302
- under separate terms or conditions or stop distributing the Licensed Material
303
- at any time; however, doing so will not terminate this Public License.
304
-
305
- e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
306
-
307
- Section 7 – Other Terms and Conditions.
308
-
309
- a. The Licensor shall not be bound by any additional or different terms or
310
- conditions communicated by You unless expressly agreed.
311
-
312
- b. Any arrangements, understandings, or agreements regarding the Licensed
313
- Material not stated herein are separate from and independent of the terms
314
- and conditions of this Public License.
315
-
316
- Section 8 – Interpretation.
317
-
318
- a. For the avoidance of doubt, this Public License does not, and shall not
319
- be interpreted to, reduce, limit, restrict, or impose conditions on any use
320
- of the Licensed Material that could lawfully be made without permission under
321
- this Public License.
322
-
323
- b. To the extent possible, if any provision of this Public License is deemed
324
- unenforceable, it shall be automatically reformed to the minimum extent necessary
325
- to make it enforceable. If the provision cannot be reformed, it shall be severed
326
- from this Public License without affecting the enforceability of the remaining
327
- terms and conditions.
328
-
329
- c. No term or condition of this Public License will be waived and no failure
330
- to comply consented to unless expressly agreed to by the Licensor.
331
-
332
- d. Nothing in this Public License constitutes or may be interpreted as a limitation
333
- upon, or waiver of, any privileges and immunities that apply to the Licensor
334
- or You, including from the legal processes of any jurisdiction or authority.
335
-
336
- Creative Commons is not a party to its public licenses. Notwithstanding, Creative
337
- Commons may elect to apply one of its public licenses to material it publishes
338
- and in those instances will be considered the “Licensor.” Except for the limited
339
- purpose of indicating that material is shared under a Creative Commons public
340
- license or as otherwise permitted by the Creative Commons policies published
341
- at creativecommons.org/policies, Creative Commons does not authorize the use
342
- of the trademark “Creative Commons” or any other trademark or logo of Creative
343
- Commons without its prior written consent including, without limitation, in
344
- connection with any unauthorized modifications to any of its public licenses
345
- or any other arrangements, understandings, or agreements concerning use of
346
- licensed material. For the avoidance of doubt, this paragraph does not form
347
- part of the public licenses.
348
-
349
- Creative Commons may be contacted at creativecommons.org.