({ short })
| 113 | } |
| 114 | |
| 115 | function toISOString ({ short }) { |
| 116 | let datePart = '' |
| 117 | |
| 118 | if (!short || this.years) { |
| 119 | datePart += this.years + propertiesISOEquivalent.years |
| 120 | } |
| 121 | |
| 122 | if (!short || this.months) { |
| 123 | datePart += this.months + propertiesISOEquivalent.months |
| 124 | } |
| 125 | |
| 126 | if (!short || this.days) { |
| 127 | datePart += this.days + propertiesISOEquivalent.days |
| 128 | } |
| 129 | |
| 130 | let timePart = '' |
| 131 | |
| 132 | if (!short || this.hours) { |
| 133 | timePart += this.hours + propertiesISOEquivalent.hours |
| 134 | } |
| 135 | |
| 136 | if (!short || this.minutes) { |
| 137 | timePart += this.minutes + propertiesISOEquivalent.minutes |
| 138 | } |
| 139 | |
| 140 | if (!short || (this.seconds || this.milliseconds)) { |
| 141 | if (this.milliseconds) { |
| 142 | timePart += (Math.trunc((this.seconds + this.milliseconds / 1000) * 1000000) / 1000000) + propertiesISOEquivalent.seconds |
| 143 | } else { |
| 144 | timePart += this.seconds + propertiesISOEquivalent.seconds |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | if (!timePart && !datePart) { |
| 149 | return 'PT0S' |
| 150 | } |
| 151 | |
| 152 | if (!timePart) { |
| 153 | return `P${datePart}` |
| 154 | } |
| 155 | |
| 156 | return `P${datePart}T${timePart}` |
| 157 | } |
| 158 | |
| 159 | const position = { value: 0 } |
| 160 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…