• Post Reply Bookmark Topic Watch Topic
  • New Topic

Constructor JDate  RSS feed

 
Armando Moncada
Ranch Hand
Posts: 30
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this constructor JDate(int julianDate) what is "int" talking about, and what is "julianDate" talking about? What am I supposed to pass to this constructor, a julian Date of type int?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is that JDate class you mention? It is not a part of the standard Java API. Do you have documentation for the JDate class? Does it explain exactly what it expects as input?
 
Armando Moncada
Ranch Hand
Posts: 30
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is from com.javaranch.common

All it says is: JDate(int julianDate)
Create a new JDate object specified as the number of days since January 1, 0000.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, the documentation explains exactly what the argument means:
Armando Moncada wrote:... the number of days since January 1, 0000.
 
Armando Moncada
Ranch Hand
Posts: 30
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, but I still don't get it.

what is "int" talking about, and what is "julianDate" talking about? What am I supposed to pass to this constructor, a julian Date of type int?

Confused GreenHorn.
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Armando Moncada wrote:Sorry, but I still don't get it.

what is "int" talking about, and what is "julianDate" talking about? What am I supposed to pass to this constructor, a julian Date of type int?

Confused GreenHorn.

int is the type of the parameter and julianDate is just a name that is used to refer to this value in the method.
See this for more information
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!