🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3263

Re: Which is the problem in: date.getMonth().toString()

#3263
From: Carlos Javier Castro Pe�a
Date: Fri, 03 Apr 1998 00:00
38 lines
1658 bytes
Sorry, I made a mistake in the previous message and pressed the 'quote'
button. My message is:


I need to compare if the actual month equals a string. The method is:

protected boolean filter_records (String tokens[], boolean valid, int
log_day, int log_month, int log_time, int log_service, int log_hostname,
int log_message, String configured_PERIOD) {
    Date date = new Date();
    if (configured_PERIOD.equals("all")) {
      valid = true;
    }
      else if ( (configured_PERIOD.equals("month")) &&
(tokens[log_month].equals() ))  {
      valid = true;
    }
      else if ( (configured_PERIOD.equals("today")) &&
(tokens[log_day].equals(date.getDay().toString())) )  {
      valid = true;
    }
  return(valid);
  }

I receive the following errors:

object type required, but int found (in the else if sentences)
Warning: deprecated APIs are used.


Where are the problems?
-- 
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Carlos Javier Castro Pe�a
email: jcaspen@iname.com
web:   http://www.latin-cancer.com/jcaspen
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Technical Details
Message-ID: <35251697.BFBA6376@iname.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35251628.E999AE98@iname.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,3d3247475eff7b17
X-Google-Attributes: gid1089d0,public
From: "Carlos Javier Castro Pe�a" <jcaspen@iname.com>
Subject: Re: Which is the problem in: date.getMonth().toString()
Date: 1998/04/03
Message-ID: <35251697.BFBA6376@iname.com>
X-Deja-AN: 340558724
Content-Transfer-Encoding: 8bit
References: <35251628.E999AE98@iname.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Organization: Univerity of Kansas
Newsgroups: borland.public.jbuilder.java.api