[lad] hebrew calendar dates

This commit is contained in:
Andrea 2021-12-29 15:46:09 +01:00
parent 20608912b7
commit 8208e735ea
44 changed files with 94 additions and 24 deletions

View File

@ -12,7 +12,7 @@
<div class="day-number">{{ d.day }}</div>
<div v-if="tooltips && year.eventsByDate[d.toString()] !== undefined && d.equals(selectedDay)" class="day-tooltip card text-dark shadow">
<div class="card-header d-flex justify-content-between">
<p class="h5 mb-0"><strong><T :params="{day: d.day}">calendar.dates.{{d.month}}</T></strong></p>
<p class="h5 mb-0"><DateWords :day="d"/></p>
<span>
<nuxt-link :to="`/${config.calendar.route}/${d}`">
<Icon v="link"/>
@ -185,7 +185,7 @@
position: absolute;
bottom: 0;
left: 100%;
width: 300px;
width: 360px;
@include media-breakpoint-down('md', $grid-breakpoints) {
position: fixed;
left: 0;

18
components/DateWords.vue Normal file
View File

@ -0,0 +1,18 @@
<template>
<span>
{{$t('calendar.date', {year: day.year, date: $t('calendar.dates.' + day.month, {day: day.day})})}}
<DateLocal :day="day" :inline="inline"/>
</span>
</template>
<script>
import DateLocal from '../data/calendar/DateLocal.vue';
export default {
components: { DateLocal },
props: {
day: { required: true },
inline: { type: Boolean },
},
};
</script>

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, Day, day, week, month, EventLevel} = require("../../src/calendar/helpers");
const {Event, Day, day, week, month, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
];

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel, Day} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel, Day} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -825,7 +825,7 @@ report:
calendar:
header: 'Calendar'
headerLong: 'Queer Calendar'
date: '%date% %year%'
date: '%date%, %year%'
months:
1: 'January'
2: 'February'

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
];

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel, Day} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel, Day} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
];

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
];

View File

@ -0,0 +1,26 @@
<template>
<span><span v-if="inline"> </span><br v-else/>{{heDate.toLocaleDateString('en-US-u-ca-hebrew', {
month: 'long',
year: 'numeric',
day: '2-digit'
})}}</span>
</template>
<script>
import HeDate from 'he-date';
export default {
props: {
day: { required: true },
inline: { type: Boolean },
},
computed: {
heDate() {
const HeDateClass = typeof(HeDate) === 'function' ? HeDate : window.HeDate;
console.log(HeDateClass);
// return 'TODO';
return new HeDateClass(+this.day.toDate());
},
},
};
</script>

View File

@ -0,0 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
];

View File

@ -115,7 +115,8 @@ profile:
defaultPronoun: 'ey_'
calendar:
enabled: false
enabled: true
route: 'kalendario'
census:
enabled: false

View File

@ -1,4 +0,0 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
module.exports = [
];

View File

@ -810,6 +810,7 @@ flags:
calendar:
header: 'Kalendario'
headerLong: 'Kalendario kuir'
date: '%date% %year%'
months:
1: 'Djenayo'
2: 'Febrayo'
@ -916,6 +917,8 @@ calendar:
genderfluid_week: 'Semana de la Conciencia de Género Fluido'
pan_week: 'Semana de la Vizibilidad Pan'
parents_day: 'Dia de les Xadres Expansivo de Género'
hiv_testing_day: 'Día Internacional de la Prueba del VIH' # TODO
freedressing_day: 'Día de la Libertad de Vestimenta' # TODO
banner: 'Oy selebramos'
celebrating_custom: 'se selebra'
celebrating_day: 'se selebra el'

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel, Day} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel, Day} = require("../../../src/calendar/helpers");
module.exports = [

View File

@ -0,0 +1 @@
<template></template>

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
// --- months ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -1,4 +1,4 @@
const {Event, day, week, month, dayYear, EventLevel} = require("../../src/calendar/helpers");
const {Event, day, week, month, dayYear, EventLevel} = require("../../../src/calendar/helpers");
module.exports = [
// --- static date ---

View File

@ -0,0 +1 @@
<template></template>

View File

@ -0,0 +1 @@
<template></template>

View File

@ -26,6 +26,7 @@
"express-session": "^1.17.1",
"generic-diff": "^1.0.1",
"grant": "^5.4.5",
"he-date": "^1.2.2",
"html-loader": "^1.3.2",
"ics": "^2.31.0",
"js-base64": "^3.5.2",

View File

@ -24,7 +24,7 @@
</div>
<div class="calendar-events my-3">
<h3>
{{$t('calendar.date', {year: day.year, date: $t('calendar.dates.' + day.month, {day: day.day})})}}
<DateWords :day="day"/>
</h3>
<ul class="list-unstyled mb-0">
<li v-for="event in year.eventsByDate[day.toString()]" class="mb-2">

View File

@ -1,6 +1,6 @@
const { Calendar, Event, EventLevel, day } = require('./helpers');
const internationalEvents = require('../../locale/_/events');
const localEvents = require('../../data/events');
const internationalEvents = require('../../locale/_/calendar/events');
const localEvents = require('../../data/calendar/events');
const rawNamedays = require('../../data/names/namedays.json');

View File

@ -4949,6 +4949,11 @@ hasha@^5.2.2:
is-stream "^2.0.0"
type-fest "^0.8.0"
he-date@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/he-date/-/he-date-1.2.2.tgz#b79a9abd99b1618aac2f67298a6d46104c582133"
integrity sha512-W7YetxS2jkehJDmtCC0cpXNHvKINHpUQy3BS+oUYDcP16tsM1PIAwRY9r7Ct5yJPVaPWoEQWfQxo6Nrfv5Unuw==
he@1.2.0, he@^1.1.0, he@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"