Skip to content

Commit f4df970

Browse files
committed
FIX a naming issue
1 parent 15dbd77 commit f4df970

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ String format3(Date d) {
327327
}
328328
```
329329

330-
If you want to use `/` instead of `-` for date separation use `formatter.ds` which changes based on date type.
330+
If you want to use `/` instead of `-` for date separation use `formatter.sep` which changes based on date type.
331331

332332
**Note** also that you do not need for example to use `int.parse()` on formatter output of `Jalali.now().formatter.m` for accessing its month, simply use `Jalali.now().month`.
333333

@@ -352,7 +352,7 @@ If you want to use `/` instead of `-` for date separation use `formatter.ds` whi
352352
- tSS: two-digit seconds.
353353
- tMS: milliseconds.
354354
- tMSSS: three-digit milliseconds.
355-
- ds: date seperator. `-` for Gregorian and `/` for Jalali.
355+
- sep: date seperator. `-` for Gregorian and `/` for Jalali.
356356

357357
You can get date formatter by using `formatter` getter on Jalali and Gregorian date objects. Simply cash this formatter in a Jalali value and then use string interpolation (as we have shown in examples) for making your desired output. This way of formatting is more powerful (and arguably easier) than using templates.
358358

lib/src/date_formatter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ abstract class DateFormatter {
136136
}
137137

138138
/// Default date Seperator
139-
String get ds;
139+
String get sep;
140140
}

lib/src/gregorian/gregorian_formatter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ class GregorianFormatter extends DateFormatter {
5151

5252
/// Default date Seperator = `-`
5353
@override
54-
String get ds => '-';
54+
String get sep => '-';
5555
}

lib/src/jalali/jalali_formatter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ class JalaliFormatter extends DateFormatter {
7272

7373
/// Default date Seperator = `/`
7474
@override
75-
String get ds => '/';
75+
String get sep => '/';
7676
}

test/shamsi_date_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ void main() {
868868
expect(f2.tMSSS, '002');
869869
expect(f3.tMSSS, '256');
870870

871-
expect(f1.ds, '/');
871+
expect(f1.sep, '/');
872872
});
873873

874874
test('Gregorian.formatter', () {
@@ -909,7 +909,7 @@ void main() {
909909
expect(f3.doy, '3');
910910
expect(f3.dddoy, '003');
911911

912-
expect(f1.ds, '-');
912+
expect(f1.sep, '-');
913913
});
914914

915915
test('Gregorian.formatter.{ t* }', () {

0 commit comments

Comments
 (0)