Skip to content

Commit

Permalink
Entries: Add deprecation warning to date method
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkni committed Feb 15, 2018
1 parent 7fe2470 commit 70e53ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions entries/date-method.xml
@@ -1,10 +1,11 @@
<?xml version="1.0"?>
<entry name="date" type="method" return="Boolean">
<title>date method</title>
<title>[DEPRECATED] date method</title>
<desc>Makes the element require a date.</desc>
<longdesc>
Return true if the value is a valid date. Uses JavaScript's built-in Date to test if the date is valid, and therefore does no sanity checks. Only the format must be valid, not the actual date, eg 30/30/2008 is a valid date.
<p>This method should not be used, since it relies on the <code>new Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</p>
<p><strong>DEPRECATION warning:</strong></p>
<p style="font-style: italic;"><strong>This method is deprecated and will be removed in version <code>2.0.0</code>.<br/>Please don't use it, since it relies on the <code>Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</strong></p>
</longdesc>
<example>
<desc>Makes "field" required and a date.</desc>
Expand Down

0 comments on commit 70e53ff

Please sign in to comment.