Skip to content

Commit

Permalink
update links to direct to guides section
Browse files Browse the repository at this point in the history
  • Loading branch information
maggie@tempworks.com committed Apr 17, 2016
1 parent 126c592 commit fb2aec5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/create/from-string.js
Expand Up @@ -113,7 +113,7 @@ hooks.createFromInputFallback = deprecate(
'moment construction falls back to js Date. This is ' +
'discouraged and will be removed in upcoming major ' +
'release. Please refer to ' +
'https://github.com/moment/moment/issues/1407 for more info.',
'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
}
Expand Down
5 changes: 3 additions & 2 deletions src/lib/locale/locales.js
Expand Up @@ -85,15 +85,16 @@ export function defineLocale (name, config) {
deprecateSimple('defineLocaleOverride',
'use moment.updateLocale(localeName, config) to change ' +
'an existing locale. moment.defineLocale(localeName, ' +
'config) should only be used for creating a new locale');
'config) should only be used for creating a new locale ' +
'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
config = mergeConfigs(locales[name]._config, config);
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
config = mergeConfigs(locales[config.parentLocale]._config, config);
} else {
// treat as if there is no base config
deprecateSimple('parentLocaleUndefined',
'specified parentLocale is not defined yet');
'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/');
}
}
locales[name] = new Locale(config);
Expand Down
3 changes: 2 additions & 1 deletion src/lib/moment/add-subtract.js
Expand Up @@ -12,7 +12,8 @@ function createAdder(direction, name) {
var dur, tmp;
//invert the arguments, but complain about it
if (period !== null && !isNaN(+period)) {
deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
tmp = val; val = period; period = tmp;
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/moment/min-max.js
Expand Up @@ -4,7 +4,7 @@ import { createLocal } from '../create/local';
import { createInvalid } from '../create/valid';

export var prototypeMin = deprecate(
'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
Expand All @@ -16,7 +16,7 @@ export var prototypeMin = deprecate(
);

export var prototypeMax = deprecate(
'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/moment/prototype.js
Expand Up @@ -144,6 +144,6 @@ import { deprecate } from '../utils/deprecate';
proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);
proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);

export default proto;

0 comments on commit fb2aec5

Please sign in to comment.