diff --git a/README.md b/README.md index c0b4f04..4c824a9 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ and thus effectively enabling most of this API in Scala.js projects. To just use the `js-joda` facade, simply add the following line to your sbt settings: ```scala -libraryDependencies += "com.zoepepper" %%% "scalajs-jsjoda" % "1.0.1" +libraryDependencies += "com.zoepepper" %%% "scalajs-jsjoda" % "1.0.2" ``` To use the facade as a `java.time` API implementation, add also: ```scala -libraryDependencies += "com.zoepepper" %%% "scalajs-jsjoda-as-java-time" % "1.0.1" +libraryDependencies += "com.zoepepper" %%% "scalajs-jsjoda-as-java-time" % "1.0.2" ``` If you have a `crossProject`, the settings must be used only in the JS part: @@ -27,8 +27,8 @@ lazy val myCross = crossProject. ... jsSettings.( libraryDependencies ++= Seq( - "com.zoepepper" %%% "scalajs-jsjoda" % "1.0.1", - "com.zoepepper" %%% "scalajs-jsjoda-as-java-time" % "1.0.1" + "com.zoepepper" %%% "scalajs-jsjoda" % "1.0.2", + "com.zoepepper" %%% "scalajs-jsjoda-as-java-time" % "1.0.2" ) ) ``` diff --git a/build.sbt b/build.sbt index c3d77d7..2612c8b 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ def BaseProject(name: String): Project = Project(name, file(name)) .settings( organization := "com.zoepepper", - version := "1.0.1", + version := "1.0.2", scalaVersion := "2.11.8", scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"), homepage := Some(url("https://github.com/zoepepper/scalajs-jsjoda")), diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Clock.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Clock.scala index 25591ee..c09a40a 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Clock.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Clock.scala @@ -14,7 +14,7 @@ object Clock extends js.Object { @js.native class Clock protected[jsjoda]() extends js.Object { - def millis: Double = js.native - def instant: Instant = js.native - def zone: ZoneId = js.native + def millis(): Double = js.native + def instant(): Instant = js.native + def zone(): ZoneId = js.native } diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/DayOfWeek.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/DayOfWeek.scala index 7cd7d92..288f114 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/DayOfWeek.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/DayOfWeek.scala @@ -10,7 +10,7 @@ import scalajs.js.annotation.JSName @js.native @JSName("JSJoda.DayOfWeek") object DayOfWeek extends js.Object { - def values: js.Array[DayOfWeek] = js.native + def values(): js.Array[DayOfWeek] = js.native def valueOf(name: String): DayOfWeek = js.native def of(dayOfWeek: Int): DayOfWeek = js.native def from(temporal: TemporalAccessor): DayOfWeek = js.native @@ -26,7 +26,7 @@ object DayOfWeek extends js.Object { @js.native class DayOfWeek protected[jsjoda]() extends TemporalAccessor { - def value: Int = js.native + def value(): Int = js.native def plus(days: Double): DayOfWeek = js.native def minus(days: Double): DayOfWeek = js.native def adjustInto(temporal: TemporalAdjusters): Temporal = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Duration.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Duration.scala index db9eaae..1abe9c1 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Duration.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Duration.scala @@ -26,8 +26,8 @@ object Duration extends js.Object { @js.native class Duration protected[jsjoda]() extends TemporalAmount { - def seconds: Double = js.native - def nano: Int = js.native + def seconds(): Double = js.native + def nano(): Int = js.native def isZero(): Boolean = js.native def isNegative(): Boolean = js.native def withSeconds(seconds: Double): Duration = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Instant.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Instant.scala index dbb629c..9f66d7b 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Instant.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Instant.scala @@ -21,8 +21,8 @@ object Instant extends js.Object { @js.native class Instant protected[jsjoda]() extends Temporal { - def epochSecoond: Double = js.native - def nano: Int = js.native + def epochSecond(): Double = js.native + def nano(): Int = js.native def isSupported(unit: TemporalUnit): Boolean = js.native def `with`(adjuster: TemporalAdjuster): Instant = js.native def `with`(field: TemporalField, newValue: Double): Instant = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDate.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDate.scala index de07f43..98f708a 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDate.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDate.scala @@ -26,13 +26,13 @@ object LocalDate extends js.Object { @js.native class LocalDate protected[jsjoda]() extends ChronoLocalDate { - def year: Int = js.native - def month: Month = js.native - def monthValue: Int = js.native - def dayOfMonth: Int = js.native - def dayOfYear: Int = js.native - def dayOfWeek: DayOfWeek = js.native - def chronology: IsoChronology = js.native + def year(): Int = js.native + def month(): Month = js.native + def monthValue(): Int = js.native + def dayOfMonth(): Int = js.native + def dayOfYear(): Int = js.native + def dayOfWeek(): DayOfWeek = js.native + def chronology(): IsoChronology = js.native def isLeapYear(): Boolean = js.native def lengthOfMonth(): Int = js.native def lengthOfYear(): Int = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDateTime.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDateTime.scala index 7e4aa50..fce2b00 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDateTime.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalDateTime.scala @@ -28,16 +28,16 @@ object LocalDateTime extends js.Object { @js.native class LocalDateTime protected[jsjoda]() extends ChronoLocalDateTime[ChronoLocalDate] { - def year: Int = js.native - def month: Month = js.native - def monthValue: Int = js.native - def dayOfMonth: Int = js.native - def dayOfYear: Int = js.native - def dayOfWeek: DayOfWeek = js.native - def hour: Int = js.native - def minute: Int = js.native - def second: Int = js.native - def nano: Int = js.native + def year(): Int = js.native + def month(): Month = js.native + def monthValue(): Int = js.native + def dayOfMonth(): Int = js.native + def dayOfYear(): Int = js.native + def dayOfWeek(): DayOfWeek = js.native + def hour(): Int = js.native + def minute(): Int = js.native + def second(): Int = js.native + def nano(): Int = js.native def isSupported(unit: TemporalUnit): Boolean = js.native def `with`(adjuster: TemporalAdjuster): LocalDateTime = js.native def `with`(field: TemporalField, newValue: Double): LocalDateTime = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalTime.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalTime.scala index 7707b0c..8fc9ec9 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalTime.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/LocalTime.scala @@ -26,10 +26,10 @@ object LocalTime extends js.Object { @js.native class LocalTime protected[jsjoda]() extends temporal.Temporal { - def hour: Int = js.native - def minute: Int = js.native - def second: Int = js.native - def nano: Int = js.native + def hour(): Int = js.native + def minute(): Int = js.native + def second(): Int = js.native + def nano(): Int = js.native def isSupported(unit: TemporalUnit): Boolean = js.native def `with`(adjuster: TemporalAdjuster): LocalTime = js.native def `with`(field: TemporalField, newValue: Double): LocalTime = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Month.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Month.scala index 5ff6e91..6abb8bc 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Month.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Month.scala @@ -8,7 +8,7 @@ import scalajs.js.annotation.JSName @js.native @JSName("JSJoda.Month") object Month extends js.Object { - def values: js.Array[Month] = js.native + def values(): js.Array[Month] = js.native def of(month: Int): Month = js.native def from(temporal: TemporalAccessor): Month = js.native @@ -28,14 +28,14 @@ object Month extends js.Object { @js.native class Month extends Temporal { - def value: Int = js.native + def value(): Int = js.native def plus(months: Double): Month = js.native def minus(months: Double): Month = js.native def length(leapYear: Boolean): Int = js.native - def minLength: Int = js.native - def maxLength: Int = js.native + def minLength(): Int = js.native + def maxLength(): Int = js.native def firstDayOfYear(leapYear: Boolean): Int = js.native - def firstMonthOfQuarter: Month = js.native + def firstMonthOfQuarter(): Month = js.native def adjustInto(temporal: Temporal): Temporal = js.native def minus(amountToSubtract: Double, unit: TemporalUnit): Month = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/MonthDay.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/MonthDay.scala index d903c0c..e6fa3c7 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/MonthDay.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/MonthDay.scala @@ -19,9 +19,9 @@ object MonthDay extends js.Object { @js.native class MonthDay extends Temporal { - def monthValue: Int = js.native - def month: Month = js.native - def dayOfMonth: Int = js.native + def monthValue(): Int = js.native + def month(): Month = js.native + def dayOfMonth(): Int = js.native def isValidYear(year: Int): Boolean = js.native def `with`(month: Month): MonthDay = js.native def withMonth(month: Int): MonthDay = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Period.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Period.scala index 9023a96..a8ef98a 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Period.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Period.scala @@ -23,13 +23,13 @@ object Period extends js.Object { @js.native class Period extends TemporalAmount { - def units: Array[ChronoUnit] = js.native - def chronology: IsoChronology = js.native - def isZero: Boolean = js.native - def isNegative: Boolean = js.native - def years: Int = js.native - def months: Int = js.native - def days: Int = js.native + def units(): Array[ChronoUnit] = js.native + def chronology(): IsoChronology = js.native + def isZero(): Boolean = js.native + def isNegative(): Boolean = js.native + def years(): Int = js.native + def months(): Int = js.native + def days(): Int = js.native def withYears(years: Int): Period = js.native def withMonths(months: Int): Period = js.native def withDays(days: Int): Period = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Year.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Year.scala index f0befd8..400b9bb 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/Year.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/Year.scala @@ -22,8 +22,8 @@ object Year extends js.Object { @js.native class Year extends Temporal { - def value: Int = js.native - def isLeap: Boolean = js.native + def value(): Int = js.native + def isLeap(): Boolean = js.native def isSupported(field: TemporalUnit): Boolean = js.native def minus(amountToSubtract: Double, unit: TemporalUnit): Year = js.native def minus(amount: TemporalAmount): Year = js.native @@ -33,7 +33,7 @@ class Year extends Temporal { def plusYears(yearsToAdd: Double): Year = js.native def adjustInto(temporal: Temporal): Temporal = js.native def isValidMonthDay(monthDay: MonthDay): Boolean = js.native - def length: Int = js.native + def length(): Int = js.native def atDay(dayOfYear: Int): LocalDate = js.native def atMonth(month: Int): YearMonth = js.native def atMonth(month: Month): YearMonth = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/YearMonth.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/YearMonth.scala index 20e8557..e86cb46 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/YearMonth.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/YearMonth.scala @@ -19,13 +19,13 @@ object YearMonth extends js.Object { @js.native class YearMonth extends Temporal { - def year: Int = js.native - def monthValue: Int = js.native - def month: Month = js.native - def isLeapYear: Boolean = js.native + def year(): Int = js.native + def monthValue(): Int = js.native + def month(): Month = js.native + def isLeapYear(): Boolean = js.native def isValidDay(dayOfMonth: Int): Boolean = js.native - def lengthOfMonth: Int = js.native - def lengthOfYear: Int = js.native + def lengthOfMonth(): Int = js.native + def lengthOfYear(): Int = js.native def isSupported(field: TemporalUnit): Boolean = js.native def withYear(year: Int): YearMonth = js.native def withMonth(month: Int): YearMonth = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneId.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneId.scala index 1a88dfe..8bda61f 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneId.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneId.scala @@ -6,6 +6,6 @@ import scalajs.js @js.native trait ZoneId extends js.Object { - def rules: ZoneRules = js.native - def normalized: ZoneId = js.native + def rules(): ZoneRules = js.native + def normalized(): ZoneId = js.native } diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneOffset.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneOffset.scala index 9c0d09a..6b3fb2b 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneOffset.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZoneOffset.scala @@ -23,8 +23,8 @@ object ZoneOffset extends js.Object { @js.native trait ZoneOffset extends ZoneId { - def totalSeconds: Int = js.native - def id: String = js.native + def totalSeconds(): Int = js.native + def id(): String = js.native def get(field: TemporalField): Int = js.native def query[T](query: TemporalQuery[T]): T = js.native def adjustInto(temporal: Temporal): Temporal = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZonedDateTime.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZonedDateTime.scala index d880e8b..dcd5cad 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZonedDateTime.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/ZonedDateTime.scala @@ -25,18 +25,18 @@ object ZonedDateTime extends js.Object { @js.native class ZonedDateTime protected[jsjoda]() extends ChronoZonedDateTime[ChronoLocalDate] { - def year: Int = js.native - def month: Month = js.native - def monthValue: Int = js.native - def dayOfMonth: Int = js.native - def dayOfYear: Int = js.native - def dayOfWeek: DayOfWeek = js.native - def hour: Int = js.native - def minute: Int = js.native - def second: Int = js.native - def nano: Int = js.native - def offset: ZoneOffset = js.native - def zone: ZoneId = js.native + def year(): Int = js.native + def month(): Month = js.native + def monthValue(): Int = js.native + def dayOfMonth(): Int = js.native + def dayOfYear(): Int = js.native + def dayOfWeek(): DayOfWeek = js.native + def hour(): Int = js.native + def minute(): Int = js.native + def second(): Int = js.native + def nano(): Int = js.native + def offset(): ZoneOffset = js.native + def zone(): ZoneId = js.native def isSupported(unit: TemporalUnit): Boolean = js.native def withZoneSameLocal(zone: ZoneId): ZonedDateTime = js.native def withZoneSameInstant(zone: ZoneId): ZonedDateTime = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/chrono/ChronoLocalDateTime.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/chrono/ChronoLocalDateTime.scala index db9cfdc..b1b9b2b 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/chrono/ChronoLocalDateTime.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/chrono/ChronoLocalDateTime.scala @@ -7,7 +7,7 @@ import scalajs.js @js.native trait ChronoLocalDateTime[D <: ChronoLocalDate] extends Temporal { - def chronology: IsoChronology = js.native + def chronology(): IsoChronology = js.native def adjustInto(temporal: Temporal): Temporal = js.native def toInstant(offset: ZoneOffset): Instant = js.native def toEpochSecond(offset: ZoneOffset): Long = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DateTimeFormatter.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DateTimeFormatter.scala index 4b412d2..ed5a7fa 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DateTimeFormatter.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DateTimeFormatter.scala @@ -26,8 +26,8 @@ object DateTimeFormatter extends js.Object { @js.native class DateTimeFormatter protected[jsjoda]() extends js.Object { - def decimalStyle: DecimalStyle = js.native - def chronology: IsoChronology = js.native + def decimalStyle(): DecimalStyle = js.native + def chronology(): IsoChronology = js.native def withChronology(chrono: IsoChronology): DateTimeFormatter = js.native def format(temporal: TemporalAccessor): String = js.native def parse(text: String): TemporalAccessor = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DecimalStyle.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DecimalStyle.scala index 9838521..0f0d3c1 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DecimalStyle.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/format/DecimalStyle.scala @@ -11,12 +11,12 @@ object DecimalStyle extends js.Object { @js.native class DecimalStyle extends js.Object { - def positiveSign: Char = js.native + def positiveSign(): Char = js.native def withPositiveSign(positiveSign: Char): DecimalStyle = js.native - def negativeSign: Char = js.native + def negativeSign(): Char = js.native def withNegativeSign(negativeSign: Char): DecimalStyle = js.native - def zeroDigit: Char = js.native + def zeroDigit(): Char = js.native def withZeroDigit(zeroDigit: Char): DecimalStyle = js.native - def decimalSeparator: Char = js.native + def decimalSeparator(): Char = js.native def withDecimalSeparator(decimalSeparator: Char): DecimalStyle = js.native } diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoField.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoField.scala index b5b3bb4..b2bec7f 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoField.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoField.scala @@ -40,15 +40,15 @@ object ChronoField extends js.Object { @js.native class ChronoField protected[jsjoda]() extends TemporalField { - def name: String = js.native - def baseUnit: TemporalUnit = js.native - def rangeUnit: TemporalUnit = js.native - def range: ValueRange = js.native - def displayName: String = js.native + def name(): String = js.native + def baseUnit(): TemporalUnit = js.native + def rangeUnit(): TemporalUnit = js.native + def range(): ValueRange = js.native + def displayName(): String = js.native def checkValidValue(value: Double): Double = js.native def checkValidIntValue(value: Double): Int = js.native - def isDateBased: Boolean = js.native - def isTimeBased: Boolean = js.native + def isDateBased(): Boolean = js.native + def isTimeBased(): Boolean = js.native def rangeRefinedBy(temporal: TemporalAccessor): ValueRange = js.native def getFrom(temporal: TemporalAccessor): Double = js.native } diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoUnit.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoUnit.scala index 7bc9723..18dcd43 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoUnit.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ChronoUnit.scala @@ -28,10 +28,10 @@ object ChronoUnit extends js.Object { @js.native class ChronoUnit protected[jsjoda]() extends TemporalUnit { - def duration: Duration = js.native - def isDurationEstimated: Boolean = js.native - def isDateBased: Boolean = js.native - def isTimeBased: Boolean = js.native + def duration(): Duration = js.native + def isDurationEstimated(): Boolean = js.native + def isDateBased(): Boolean = js.native + def isTimeBased(): Boolean = js.native def isSupportedBy(temporal: Temporal): Boolean = js.native def addTo(temporal: Temporal, amount: Double): Temporal = js.native def between(temporal1: Temporal, temporal2: Temporal): Double = js.native diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalAmount.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalAmount.scala index 5c914d6..00d3bcc 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalAmount.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalAmount.scala @@ -5,7 +5,7 @@ import scalajs.js @js.native trait TemporalAmount extends js.Object { def get(unit: TemporalUnit): Double = js.native - def getUnits: js.Array[TemporalUnit] = js.native + def getUnits(): js.Array[TemporalUnit] = js.native def addTo(temporal: Temporal): Temporal = js.native def subtractFrom(temporal: Temporal): Temporal = js.native } \ No newline at end of file diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalQueries.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalQueries.scala index c1fb1fb..b7bf153 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalQueries.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/TemporalQueries.scala @@ -10,11 +10,11 @@ import scalajs.js.annotation.JSName @js.native @JSName("JSJoda.TemporalQueries") object TemporalQueries extends js.Object { - def zoneId: TemporalQuery[ZoneId] = js.native - def chronology: TemporalQuery[Chronology] = js.native - def precision: TemporalQuery[TemporalUnit] = js.native - def zone: TemporalQuery[ZoneId] = js.native - def offset: TemporalQuery[ZoneOffset] = js.native - def localDate: TemporalQuery[LocalDate] = js.native - def localTime: TemporalQuery[LocalTime] = js.native + def zoneId(): TemporalQuery[ZoneId] = js.native + def chronology(): TemporalQuery[Chronology] = js.native + def precision(): TemporalQuery[TemporalUnit] = js.native + def zone(): TemporalQuery[ZoneId] = js.native + def offset(): TemporalQuery[ZoneOffset] = js.native + def localDate(): TemporalQuery[LocalDate] = js.native + def localTime(): TemporalQuery[LocalTime] = js.native } \ No newline at end of file diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ValueRange.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ValueRange.scala index c14a60c..418d1ae 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ValueRange.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/temporal/ValueRange.scala @@ -13,14 +13,14 @@ object ValueRange extends js.Object { @js.native class ValueRange protected[jsjoda]() extends js.Object { - def isFixed: Boolean = js.native - def minimum: Double = js.native - def largestMinimum: Double = js.native - def maximum: Double = js.native - def smallestMaximum: Double = js.native + def isFixed(): Boolean = js.native + def minimum(): Double = js.native + def largestMinimum(): Double = js.native + def maximum(): Double = js.native + def smallestMaximum(): Double = js.native def isValidValue(value: Double): Boolean = js.native def isValidIntValue(value: Double): Boolean = js.native def checkValidValue(value: Double, field: TemporalField): Double = js.native def checkValidIntValue(value: Double, field: TemporalField): Int = js.native - def isIntValue: Boolean = js.native + def isIntValue(): Boolean = js.native } diff --git a/facade/src/main/scala/com/zoepepper/facades/jsjoda/zone/ZoneRules.scala b/facade/src/main/scala/com/zoepepper/facades/jsjoda/zone/ZoneRules.scala index 44d1349..926102d 100644 --- a/facade/src/main/scala/com/zoepepper/facades/jsjoda/zone/ZoneRules.scala +++ b/facade/src/main/scala/com/zoepepper/facades/jsjoda/zone/ZoneRules.scala @@ -13,7 +13,7 @@ object ZoneRules extends js.Object { @js.native trait ZoneRules extends js.Object { - def isFixedOffset: Boolean = js.native + def isFixedOffset(): Boolean = js.native def offset(instant: Instant): ZoneOffset = js.native def offset(localDateTime: LocalDateTime): ZoneOffset = js.native def isValidOffset(localDateTime: LocalDateTime, offset: ZoneOffset): Boolean = js.native diff --git a/java-time-drop-in/src/main/scala/java/time/DayOfWeek.scala b/java-time-drop-in/src/main/scala/java/time/DayOfWeek.scala index ab67f7a..1765ea9 100644 --- a/java-time-drop-in/src/main/scala/java/time/DayOfWeek.scala +++ b/java-time-drop-in/src/main/scala/java/time/DayOfWeek.scala @@ -8,7 +8,7 @@ import java.util.Locale import com.zoepepper.facades.jsjoda.{DayOfWeek => DayOfWeekF} object DayOfWeek { - def values: Array[DayOfWeek] = DayOfWeekF.values + def values(): Array[DayOfWeek] = DayOfWeekF.values def valueOf(name: String): DayOfWeek = DayOfWeekF.valueOf(name) def of(dayOfWeek: Int): DayOfWeek = DayOfWeekF.of(dayOfWeek) def from(temporal: TemporalAccessor): DayOfWeek = DayOfWeekF.from(temporal) diff --git a/java-time-drop-in/src/main/scala/java/time/Duration.scala b/java-time-drop-in/src/main/scala/java/time/Duration.scala index 5fccb36..2bf7041 100644 --- a/java-time-drop-in/src/main/scala/java/time/Duration.scala +++ b/java-time-drop-in/src/main/scala/java/time/Duration.scala @@ -26,10 +26,10 @@ class Duration protected[time](f: DurationF) extends Wraps(f) with Comparable[Du def abs(): Duration = f.abs() def compareTo(otherDuration: Duration): Int = f.compareTo(otherDuration) def dividedBy(divisor: Long): Duration = f.dividedBy(divisor) - def getNano(): Int = f.getNano() - def getSeconds(): Long = f.getSeconds().toLong - def isNegative(): Boolean = f.isNegative() - def isZero(): Boolean = f.isZero() + def getNano(): Int = f.nano + def getSeconds(): Long = f.seconds.toLong + def isNegative(): Boolean = f.isNegative + def isZero(): Boolean = f.isZero def minus(duration: Duration): Duration = f.minus(duration) def minus(amountToSubtract: Long, unit: TemporalUnit): Duration = f.minus(amountToSubtract, unit) def minusDays(daysToSubtract: Long): Duration = f.minusDays(daysToSubtract) diff --git a/java-time-drop-in/src/main/scala/java/time/Instant.scala b/java-time-drop-in/src/main/scala/java/time/Instant.scala index 8fca989..aa2b3b0 100644 --- a/java-time-drop-in/src/main/scala/java/time/Instant.scala +++ b/java-time-drop-in/src/main/scala/java/time/Instant.scala @@ -21,8 +21,8 @@ object Instant { class Instant protected[time](f: InstantF) extends Wraps(f) with Comparable[Instant] with Temporal with TemporalAdjuster { - def getEpochSecond(): Long = f.getEpochSecond().toLong - def getNano(): Int = f.getNano() + def getEpochSecond(): Long = f.epochSecond.toLong + def getNano(): Int = f.nano def isSupported(unit: TemporalUnit): Boolean = f.isSupported(unit) def `with`(adjuster: TemporalAdjuster): Instant = f.`with`(adjuster) def `with`(field: TemporalField, newValue: Long): Instant = f.`with`(field, newValue) diff --git a/java-time-drop-in/src/main/scala/java/time/temporal/TemporalAmount.scala b/java-time-drop-in/src/main/scala/java/time/temporal/TemporalAmount.scala index d5b9ead..e967f26 100644 --- a/java-time-drop-in/src/main/scala/java/time/temporal/TemporalAmount.scala +++ b/java-time-drop-in/src/main/scala/java/time/temporal/TemporalAmount.scala @@ -12,6 +12,6 @@ trait TemporalAmount { self: Wrapper => def addTo(temporal: Temporal): Temporal = f2Temporal(temporalAmountF.addTo(temporal), temporal) def get(unit: TemporalUnit): Long = temporalAmountF.get(unit).toLong - def getUnits: java.util.List[TemporalUnit] = (temporalAmountF.getUnits.map(_.asInstanceOf[ChronoUnitF]): java.util.List[ChronoUnit]).asInstanceOf[java.util.List[TemporalUnit]] + def getUnits(): java.util.List[TemporalUnit] = (temporalAmountF.getUnits.map(_.asInstanceOf[ChronoUnitF]): java.util.List[ChronoUnit]).asInstanceOf[java.util.List[TemporalUnit]] def subtractFrom(temporal: Temporal): Temporal = f2Temporal(temporalAmountF.subtractFrom(temporal), temporal) } \ No newline at end of file diff --git a/java-time-drop-in/src/main/scala/java/time/temporal/TemporalQueries.scala b/java-time-drop-in/src/main/scala/java/time/temporal/TemporalQueries.scala index aeffed5..128a66d 100644 --- a/java-time-drop-in/src/main/scala/java/time/temporal/TemporalQueries.scala +++ b/java-time-drop-in/src/main/scala/java/time/temporal/TemporalQueries.scala @@ -11,11 +11,11 @@ import scalajs.js.annotation.JSName @js.native @JSName("JSJoda.TemporalQueries") object TemporalQueries extends scalajs.js.Object { - def zoneId: TemporalQuery[ZoneId] = scalajs.js.native - def chronology: TemporalQuery[Chronology] = scalajs.js.native - def precision: TemporalQuery[TemporalUnit] = scalajs.js.native - def zone: TemporalQuery[ZoneId] = scalajs.js.native - def offset: TemporalQuery[ZoneOffset] = scalajs.js.native - def localDate: TemporalQuery[LocalDate] = scalajs.js.native - def localTime: TemporalQuery[LocalTime] = scalajs.js.native + def zoneId(): TemporalQuery[ZoneId] = scalajs.js.native + def chronology(): TemporalQuery[Chronology] = scalajs.js.native + def precision(): TemporalQuery[TemporalUnit] = scalajs.js.native + def zone(): TemporalQuery[ZoneId] = scalajs.js.native + def offset(): TemporalQuery[ZoneOffset] = scalajs.js.native + def localDate(): TemporalQuery[LocalDate] = scalajs.js.native + def localTime(): TemporalQuery[LocalTime] = scalajs.js.native } \ No newline at end of file