From 142a783ae7eeaa664d19277ca58cec52ed6b51ef Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 1 Oct 2020 20:15:51 -0400 Subject: [PATCH 1/2] Update docs for `parse` to discourage its use --- src/Data/JSDate.purs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Data/JSDate.purs b/src/Data/JSDate.purs index f13a1c0..f23398b 100644 --- a/src/Data/JSDate.purs +++ b/src/Data/JSDate.purs @@ -150,8 +150,11 @@ foreign import dateMethod :: forall a. Fn2 String JSDate a -- | Attempts to parse a date from a string. The behaviour of this function is -- | implementation specific until ES5, so may not always have the same --- | behaviour for a given string. The RFC2822 and ISO8601 date string formats --- | should parse consistently. +-- | behavior for a given string. For this reason, it is **strongly** encouraged +-- | that you avoid this function if at all possible. +-- | +-- | If you must use it, the RFC2822 and ISO8601 date string formats should +-- | parse consistently. -- | -- | This function is effectful because if no time zone is specified in the -- | string the current locale's time zone will be used instead. From 9f71eb29d84151a223080165616d5b75e2092059 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 1 Oct 2020 21:34:59 -0400 Subject: [PATCH 2/2] Use same spelling within the same doc string --- src/Data/JSDate.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/JSDate.purs b/src/Data/JSDate.purs index f23398b..4ae7ac9 100644 --- a/src/Data/JSDate.purs +++ b/src/Data/JSDate.purs @@ -148,7 +148,7 @@ foreign import jsdateLocal foreign import dateMethodEff :: forall a. Fn2 String JSDate (Effect a) foreign import dateMethod :: forall a. Fn2 String JSDate a --- | Attempts to parse a date from a string. The behaviour of this function is +-- | Attempts to parse a date from a string. The behavior of this function is -- | implementation specific until ES5, so may not always have the same -- | behavior for a given string. For this reason, it is **strongly** encouraged -- | that you avoid this function if at all possible.