jekyll-zeta 0.9.19 → 0.9.21

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/getmapdata.js +14 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ee4f483ad64965afb1fb373b78541bc167b4ca5319d4101c6a3bc9c06aed56d
4
- data.tar.gz: 1fe90ad0e2ddc8c22957e12970c025702475253284519b1fc67dbfe66367c6eb
3
+ metadata.gz: 48218f35cd6ea372bbe59540aedee23be204e78316ed890aaf388e87d8ac21c2
4
+ data.tar.gz: ab582042969267aa38eff75c514458785adee59c44536ec19e8627a129070b7c
5
5
  SHA512:
6
- metadata.gz: 78531f9f930b115082a2747a39cd05a0042bede9e668a4796ce755f5a448c65d89647b258f1668b12671418fa7afd15e77b26711775e33bb38165e5131552baa
7
- data.tar.gz: e2cb05b82acb22eee6003d92d5ae66d07fba58fdbdf750ad965410bdcef705f9f7cfade274565008fdfcfff0a2087309ae2969f1ad3daf5bbe24482bc8a0a716
6
+ metadata.gz: 42182868f066083c74e2937a5d0ed44b10a3a8653f9573a06c0d526f00ab480dcf2d179cb7e5b80f0094f0d73067e11f91417a36cb81e5c318576e6370b6dcbc
7
+ data.tar.gz: 3837ac31d91770f3c6cd01d810516a8035a4832b11323f8eac610d9d0bf6ebf108dcc557fa8717662ead1a03890a840f3e734b8cb45783198b72c44dd3444a4f
@@ -2,6 +2,15 @@
2
2
  (function () {
3
3
  var g_id = 100;
4
4
 
5
+ function normalizeYmd(ymd){
6
+ if (ymd) {
7
+ const arr = ymd.split('-')
8
+ return `${arr[0]}-${arr[1].padStart(2,'0')}-${arr[2].padStart(2,'0')}`
9
+ }
10
+
11
+ return ymd
12
+ }
13
+
5
14
 
6
15
  function getConfigFromStr(str,obj){
7
16
  if (str && str.startsWith('#')) {
@@ -42,18 +51,21 @@
42
51
  let arrRg = date0.split('~')
43
52
  let beginYmd = arrRg[0]
44
53
  let endYmd = arrRg[1]
45
- let dateBegin = new Date(beginYmd)
54
+ let dateBegin = new Date(normalizeYmd(beginYmd))
46
55
  if (!dateBegin || isNaN(dateBegin)) {
47
56
 
48
57
  return
49
58
  }
50
59
  let rangCount = 7
51
60
  if(endYmd){
52
- let dend = new Date(endYmd)
61
+ let dend = new Date(normalizeYmd(endYmd))
53
62
  if (dend && !isNaN(dend)) {
54
63
  rangCount = Math.floor((dend.getTime() - dateBegin.getTime())/ 86400000) + 1
55
64
  }
56
65
 
66
+ }else{
67
+ rangCount = Math.floor((Date.now() - dateBegin.getTime())/ 86400000) + 1;
68
+ if(rangCount > 7) rangCount =7
57
69
  }
58
70
 
59
71
  const desc = arr.slice(1).join(' ')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-zeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.19
4
+ version: 0.9.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock