@@ -864,6 +864,11 @@ export default class Duration {
864
864
865
865
/**
866
866
* Get the years.
867
+ *
868
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
869
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
870
+ *
871
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
867
872
* @type {number }
868
873
*/
869
874
get years ( ) {
@@ -872,6 +877,11 @@ export default class Duration {
872
877
873
878
/**
874
879
* Get the quarters.
880
+ *
881
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
882
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
883
+ *
884
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
875
885
* @type {number }
876
886
*/
877
887
get quarters ( ) {
@@ -880,6 +890,11 @@ export default class Duration {
880
890
881
891
/**
882
892
* Get the months.
893
+ *
894
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
895
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
896
+ *
897
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
883
898
* @type {number }
884
899
*/
885
900
get months ( ) {
@@ -888,6 +903,11 @@ export default class Duration {
888
903
889
904
/**
890
905
* Get the weeks
906
+ *
907
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
908
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
909
+ *
910
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
891
911
* @type {number }
892
912
*/
893
913
get weeks ( ) {
@@ -896,6 +916,11 @@ export default class Duration {
896
916
897
917
/**
898
918
* Get the days.
919
+ *
920
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
921
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
922
+ *
923
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
899
924
* @type {number }
900
925
*/
901
926
get days ( ) {
@@ -904,6 +929,11 @@ export default class Duration {
904
929
905
930
/**
906
931
* Get the hours.
932
+ *
933
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
934
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
935
+ *
936
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
907
937
* @type {number }
908
938
*/
909
939
get hours ( ) {
@@ -912,6 +942,11 @@ export default class Duration {
912
942
913
943
/**
914
944
* Get the minutes.
945
+ *
946
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
947
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
948
+ *
949
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
915
950
* @type {number }
916
951
*/
917
952
get minutes ( ) {
@@ -920,6 +955,11 @@ export default class Duration {
920
955
921
956
/**
922
957
* Get the seconds.
958
+ *
959
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
960
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
961
+ *
962
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
923
963
* @return {number }
924
964
*/
925
965
get seconds ( ) {
@@ -928,6 +968,11 @@ export default class Duration {
928
968
929
969
/**
930
970
* Get the milliseconds.
971
+ *
972
+ * Note: Durations created out of Duration.from* (e.g. fromObject) factories will always yield 0.
973
+ * This will give you the correct difference in years, if the Duration was created out of a diff operation.
974
+ *
975
+ * More information: https://moment.github.io/luxon/#/math?id=duration-math
931
976
* @return {number }
932
977
*/
933
978
get milliseconds ( ) {
@@ -987,4 +1032,4 @@ export default class Duration {
987
1032
}
988
1033
return true ;
989
1034
}
990
- }
1035
+ }
0 commit comments