|
@ -1,7 +1,7 @@ |
|
|
const moment = require("moment") |
|
|
const moment = require("moment") |
|
|
|
|
|
|
|
|
module.exports = class { |
|
|
module.exports = class { |
|
|
onCreate({kind, value, updated}) { |
|
|
|
|
|
|
|
|
onCreate({kind, value, updated, utc}) { |
|
|
this.state = {text: null, color: "color-menu", tooltip: null} |
|
|
this.state = {text: null, color: "color-menu", tooltip: null} |
|
|
|
|
|
|
|
|
if (value == null || value == "") { |
|
|
if (value == null || value == "") { |
|
@ -10,7 +10,7 @@ module.exports = class { |
|
|
|
|
|
|
|
|
switch (kind) { |
|
|
switch (kind) { |
|
|
case "date": { |
|
|
case "date": { |
|
|
const m = moment(value) |
|
|
|
|
|
|
|
|
const m = utc ? moment.utc(value) : moment(value) |
|
|
if (m.year() < 2) { |
|
|
if (m.year() < 2) { |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|