()
| 1236 | * @since 3.13/4.10 |
| 1237 | */ |
| 1238 | public int getDayOfYear() { |
| 1239 | |
| 1240 | switch (this.month) { |
| 1241 | case 1: |
| 1242 | return this.dayOfMonth; |
| 1243 | case 2: |
| 1244 | return 31 + this.dayOfMonth; |
| 1245 | default: |
| 1246 | return ( |
| 1247 | DAY_OF_YEAR_PER_MONTH[this.month - 2] |
| 1248 | + this.dayOfMonth |
| 1249 | + (GregorianMath.isLeapYear(this.year) ? 1 : 0)); |
| 1250 | } |
| 1251 | |
| 1252 | } |
| 1253 | |
| 1254 | /** |
| 1255 | * <p>Calculates the length of associated month in days. </p> |
no test coverage detected