Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 95bc791

Browse files
author
Lionel Bijaoui
committed
Merge branch 'lb_separate_bundle'. Fix some unit test and change webpack config.
2 parents 8534015 + cc80dd6 commit 95bc791

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎full/data.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Fakerator from "fakerator";
2-
import moment from "moment";
2+
import fecha from "fecha";
33

44
let fakerator = new Fakerator();
55

@@ -26,8 +26,8 @@ module.exports = {
2626
user.bio = fakerator.lorem.paragraph();
2727
let dob = fakerator.date.past(40, "1998年01月01日");
2828
user.dob = dob.valueOf();
29-
user.time = moment().format("hh:mm:ss");
30-
user.age = moment().year() - moment(dob).year();
29+
user.time = fecha.format(newDate(),"hh:mm:ss");
30+
user.age = fecha.format(newDate().getFullYear() - dob,"YY");
3131
user.rank = fakerator.random.number(1, 10);
3232
user.role = fakerator.random.arrayElement(roles).id;
3333
//user.mobile = fakerator.phone.phoneNumber();

‎full/schema.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import moment from "moment";
1+
import fecha from "fecha";
22

33
import {
44
validators
@@ -352,7 +352,7 @@ module.exports = {
352352
label: "Created (label field)",
353353
model: "created",
354354
get(model) {
355-
return model && model.created ? moment(model.created).format("LLL") : "-";
355+
// return model && model.created ? fecha.format(model.created,"MMMM D YYYY H") : "-";
356356
},
357357
styleClasses: "half-width"
358358
}, {
@@ -535,8 +535,8 @@ module.exports = {
535535
model: "dob",
536536
required: true,
537537
placeholder: "User's birth of date",
538-
min: moment("1900-01-01").toDate(),
539-
max: moment("2018-01-01").toDate(),
538+
min: fecha.parse("1900-01-01","YYYY-MM-DD"),
539+
max: fecha.parse("2018-01-01","YYYY-MM-DD"),
540540
validator: [
541541
validators.date
542542
],

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /