Sha256: 6b6a768291130033d678787ff9a7f10f1e311408ccbc7892673d2817db6df24b

Contents?: true

Size: 424 Bytes

Versions: 11

Compression:

Stored size: 424 Bytes

Contents

import { createDuration } from '../duration/create';
import { createLocal } from '../create/local';

export function from (time, withoutSuffix) {
    if (!this.isValid()) {
        return this.localeData().invalidDate();
    }
    return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
}

export function fromNow (withoutSuffix) {
    return this.from(createLocal(), withoutSuffix);
}

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
active_record_survey_api-0.0.19 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.18 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.17 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.14 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.12 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.11 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.7 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
active_record_survey_api-0.0.6 spec/test_app/vendor/assets/bower_components/moment/src/lib/moment/from.js
date_picker-0.0.8 test/dummy/vendor/assets/components/moment/src/lib/moment/from.js
date_picker-0.0.7 test/dummy/vendor/assets/components/moment/src/lib/moment/from.js
sedge_cms-0.0.1 vendor/assets/components/moment/src/lib/moment/from.js