Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ see [CONTRIBUTING.md](CONTRIBUTING.md#release-instructions-for-a-new-version) fo
[#360](https://github.com/lunarmodules/Penlight/pull/360)
- deprecate: `permute.table`, renamed to `permute.order_table` (removal later)
[#360](https://github.com/lunarmodules/Penlight/pull/360)
- deprecate: `Date` module (removal later)
[#367](https://github.com/lunarmodules/Penlight/pull/367)
- feat: `permute.list_iter` to iterate over different sets of values
[#360](https://github.com/lunarmodules/Penlight/pull/360)
- feat: `permute.list_table` generate table with different sets of values
Expand Down
2 changes: 2 additions & 0 deletions docs_topics/05-dates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<a id="date"></a>

NOTE: the Date module is deprecated

### Creating and Displaying Dates

The `Date` class provides a simplified way to work with [date and
Expand Down
12 changes: 12 additions & 0 deletions lua/pl/Date.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
--- Date and Date Format classes.
-- See @{05-dates.md|the Guide}.
--
-- NOTE: the date module is deprecated! see
-- https://github.com/lunarmodules/Penlight/issues/285
--
-- Dependencies: `pl.class`, `pl.stringx`, `pl.utils`
-- @classmod pl.Date
-- @pragma nostrip
Expand All @@ -11,6 +14,15 @@ local stringx = require 'pl.stringx'
local utils = require 'pl.utils'
local assert_arg,assert_string = utils.assert_arg,utils.assert_string


utils.raise_deprecation {
source = "Penlight " .. utils._VERSION,
message = "the 'Date' module is deprecated, see https://github.com/lunarmodules/Penlight/issues/285",
version_removed = "2.0.0",
version_deprecated = "1.9.2",
}


local Date = class()
Date.Format = class()

Expand Down