1 assert(dur!"weeks"(12).total!"weeks" == 12); 2 assert(dur!"weeks"(12).total!"days" == 84); 3 4 assert(dur!"days"(13).total!"weeks" == 1); 5 assert(dur!"days"(13).total!"days" == 13); 6 7 assert(dur!"hours"(49).total!"days" == 2); 8 assert(dur!"hours"(49).total!"hours" == 49); 9 10 assert(dur!"nsecs"(2007).total!"hnsecs" == 20); 11 assert(dur!"nsecs"(2007).total!"nsecs" == 2000);
Returns the total number of the given units in this Duration. So, unlike split, it does not strip out the larger units.