Skip to content

Commit eeb5d40

Browse files
authored
Merge pull request #184 from farhan7reza7/type-adder
resolving types issue
2 parents cd457f5 + f7bb4ab commit eeb5d40

File tree

3 files changed

+55
-11
lines changed

3 files changed

+55
-11
lines changed

CHANGELOG.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.1 on
135135

136136
fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on npm registry
137137

138-
139138
### [v2.0.3]
140139

141140
#### Fixed
@@ -146,8 +145,6 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
146145
- updated varaibles keywords to modern Js keywords
147146
- fixed some other issues and configured files for v2.0.3
148147

149-
150-
151148
### [v2.1.0]
152149

153150
#### Added
@@ -165,7 +162,6 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
165162
- Modified internal structure: Refactored internal code for better readability and maintainability.
166163
- Enhanced README.md for follwing best practices
167164

168-
169165
#### Fixed
170166

171167
- Fixed some issues related to the new changes.
@@ -180,10 +176,10 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
180176

181177
- Continuous Integration: Integrated automated testing with GitHub Actions for ongoing code quality assurance.
182178

183-
184179
### [v2.1.1]
185180

186181
#### Fixed
182+
187183
- Updated package.json main field for corrected issue in v2.1.0
188184
- fixed some other issues and configured files for v2.1.1
189185

@@ -217,6 +213,7 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
217213
### [v2.2.1]
218214

219215
#### Fixed
216+
220217
- Updated codebase for delivery library through cdn as well as npm
221218
- fixed some other issues and configured files for v2.2.1
222219

@@ -242,19 +239,23 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
242239
### [v2.3.1]
243240

244241
#### Fixed
242+
245243
- Updated reademe doc for documenting cdn and npm approach following best practices
246244
- fixed some other issues and configured files for v2.3.1
247245

248246
#### Changed
247+
249248
- Updated links to abs url for cross compatibility
250249

251250
### [v2.3.2]
252251

253252
#### Fixed
253+
254254
- updated doc for documenting latest cdn and npm approach following best practices for v2.3.2
255255
- fixed some other issues and configured files for v2.3.2
256256

257257
#### Changed
258+
258259
- added security dependabot
259260
- added codeql
260261

@@ -266,6 +267,7 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
266267
- Updated the README.md documentation for following the best practices.
267268

268269
#### Changed
270+
269271
- Updated the README.md documentation for following the best practices.
270272
- Updated issue templates with correct descriptions and links
271273

@@ -278,16 +280,16 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
278280

279281
- README.md updated: Added consistent formating and recommended for best practices.
280282

281-
282283
### [v3.1.0]
283284

284285
#### Added
285286

286-
- **Simplification:** Integrate diff as global Date Object method on importing
287+
- **Simplification:** Integrate diff as global Date Object method on importing
287288
- Added source codes for integrating to Date
288289
- Added the README.md codes for documenting integration.
289290

290291
#### Changed
292+
291293
- Updated the README.md documentation for documenting integration.
292294
- Updated source codes
293295
- Enhanced README.md for follwing best practices and recommended practices
@@ -302,7 +304,8 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
302304
### [v3.1.1]
303305

304306
#### Fixed
305-
- Updated codebase for updating diff to best practiced
307+
308+
- Updated codebase for updating diff to best practiced
306309
- fixed some other issues and configured files for v3.1.1
307310

308311
### [v3.1.2]
@@ -312,10 +315,16 @@ fixed some issues and configured files for publishing diff-ymd-package v2.0.2 on
312315
- updated doc for documenting latest Global Date integration following best practices
313316
- fixed some other issues and configured files for v2.3.2
314317

318+
### [v3.1.3]
319+
320+
#### Fixed
321+
322+
- added diff-ymd-package.d.ts to resolve the types issue
323+
315324
### [Next Release] - Collecting issues and new features for next release
316325

317326
### Important changes links:
318327

319-
- [Unreleased](https://github.com/farhan7reza7/diff-ymd-package/compare/v3.1.2...HEAD)
320-
- [v3.1.2](https://github.com/farhan7reza7/diff-ymd-package/releases/tag/v3.1.2)
328+
- [Unreleased](https://github.com/farhan7reza7/diff-ymd-package/compare/v3.1.3...HEAD)
329+
- [v3.1.3](https://github.com/farhan7reza7/diff-ymd-package/releases/tag/v3.1.3)
321330
- [Next Release](https://github.com/farhan7reza7/diff-ymd-package/milestone/2)

diff-ymd-package.d.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
declare class DatesYMD {
2+
constructor(
3+
firstDate: string | number | Date,
4+
secondDate: string | number | Date,
5+
);
6+
7+
diffArray(): [number, number, number, string];
8+
formattedYMD(): string;
9+
customizeFormat(
10+
yearUnit: string,
11+
monthUnit: string,
12+
dayUnit: string,
13+
partSeparator: string,
14+
): string;
15+
diffInMonths(): number;
16+
diffInWeeks(): number;
17+
diffInDays(): number;
18+
diffInYears(): number;
19+
diffInHours(): number;
20+
diffInMinutes(): number;
21+
diffInSeconds(): number;
22+
}
23+
24+
declare function diffDates(
25+
firstDate: string | number | Date,
26+
secondDate: string | number | Date,
27+
): DatesYMD;
28+
29+
// The hybrid CommonJS module export:
30+
declare const diffYMDPackage: typeof DatesYMD & {
31+
diffDates: typeof diffDates;
32+
};
33+
34+
export = diffYMDPackage;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "diff-ymd-package",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"description": "A javascript library for calculating the difference between two dates in formatted ways like (aY bM cD)(aYears bMonths cDays) or customized desired formats like aY-bM-cD or aYears-bMonths-cDays or kDays or mWeeks or nMonths etc.",
55
"main": "lib/index.js",
66
"scripts": {
77
"test": "jest"
88
},
9+
"types": "diff-ymd-package.d.ts",
910
"keywords": [
1011
"diff-ymd-package",
1112
"ymd",

0 commit comments

Comments
 (0)