Results 1 to 3 of 3

Thread: period function

  1. #1
    newbiejava is offline Senior Member
    Join Date
    Jan 2010
    Posts
    138
    Rep Power
    0

    Default period function

    Dear All,

    is there any java function can I use to get value of the period (month & year)
    if period - 1 then it should be last month
    if period + 1 then it should be next month
    it also must be considered if currently in january.. then if period - 1 it should be december last year ..
    and also if it's on december then if period + 1 then it should be next year.

    any idea or java function can I use for doing this?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Java doesn't have functions. You're probably looking for a class.
    Look at the Calendar class and its relatives for working with dates.

  3. #3
    newbiejava is offline Senior Member
    Join Date
    Jan 2010
    Posts
    138
    Rep Power
    0

Similar Threads

  1. take the total time for particular period
    By baktha.thalapathy in forum New To Java
    Replies: 3
    Last Post: 06-08-2010, 10:42 AM
  2. Replies: 3
    Last Post: 12-04-2009, 04:08 PM
  3. Addition of period to dates
    By jboy in forum New To Java
    Replies: 4
    Last Post: 09-14-2009, 01:23 PM
  4. Have a period in string, how to make it look nicer
    By JordashTalon in forum New To Java
    Replies: 6
    Last Post: 03-06-2009, 01:23 AM
  5. signing applets for a period of time
    By sandeepk84@gmail.com in forum Java Applets
    Replies: 0
    Last Post: 12-04-2007, 02:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •