Skip to content

Commit

Permalink
Fix facade: Added missing parentheses.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiaggio committed Jun 28, 2016
1 parent bed590d commit eedf558
Show file tree
Hide file tree
Showing 31 changed files with 123 additions and 123 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
)
)
```
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions facade/src/main/scala/com/zoepepper/facades/jsjoda/Month.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions facade/src/main/scala/com/zoepepper/facades/jsjoda/Period.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions facade/src/main/scala/com/zoepepper/facades/jsjoda/Year.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Loading

0 comments on commit eedf558

Please sign in to comment.