Package railo.runtime.type.dt

Examples of railo.runtime.type.dt.DateTime


        data.append(',');
        data.append("\"web-0\"");
       
        data.append(',');
       
        DateTime date = new DateTimeImpl();
        // Date
        data.append('"');
        data.append(dateFormat.format(date,"mm/dd/yyyy",TimeZone.getDefault()));
        data.append('"');
       
View Full Code Here


        cookies.setAtEL(dec(item),row, Boolean.TRUE);
      else { // name and value
        n=dec(item.substring(0,index));
        v=dec(item.substring(index+1));
        if(n.equalsIgnoreCase("expires")) {
          DateTime d = Caster.toDate(v, false, null,null);
         
          if(d!=null) {
            cookies.setAtEL(n,row, d);
            continue;
          }
View Full Code Here

     */
    public DateTime toDateTime(Element el,String attributeName, DateTime defaultValue) {
       
        String value = el.getAttribute(attributeName);
        if(value==null) return defaultValue;
        DateTime dtValue=Caster.toDate(value,false,null,null);
        if(dtValue==null) return defaultValue;
        return dtValue;
    }
View Full Code Here

     * @param el XML Element to read Attribute from it
     * @param attributeName Name of the Attribute to read
     * @return Attribute Value
     */
    public Date toDate(Config config,Element el,String attributeName) {
        DateTime dt = toDateTime(config,el,attributeName);
        if(dt==null) return null;
        return new DateImpl(dt);
    }
View Full Code Here

     * @param el XML Element to read Attribute from it
     * @param attributeName Name of the Attribute to read
     * @return Attribute Value
     */
    public Time toTime(Config config, Element el,String attributeName) {
        DateTime dt = toDateTime(config,el,attributeName);
        if(dt==null) return null;
        return new TimeImpl(dt);
    }
View Full Code Here

   * @param date
   * @param mask
   * @return formated date
   */
  public String format(Date date,String mask) {
    DateTime dt=(date instanceof DateTime)?(DateTime)date:new DateTimeImpl(date.getTime(),false);
    return format(dt,mask,null);
  }
View Full Code Here

  private void doClientCache() {
        pageContext.setHeader("Last-Modified",GetHttpTimeString.call(pageContext,now));
       
        if(timespan!=null) {
            DateTime expires = getExpiresDate();
            pageContext.setHeader("Expires",GetHttpTimeString.call(pageContext,expires));
        }
    }
View Full Code Here

      values=list.toArray(new Boolean[list.size()]);
    }
    // DateTime
    else if(type==CFTypes.TYPE_DATETIME) {
      List<DateTime> list=new ArrayList<DateTime>();
      DateTime dt;
      for(int i=0;i<res.length;i++){
        dt=Caster.toDate(res[i],true,null,null);
        if(dt!=null)list.add(dt);
      }
      values=list.toArray(new DateTime[list.size()]);
View Full Code Here

     
      if(labelFormat==LabelFormatUtil.LABEL_FORMAT_DATE && rangeAxis.getRange().getLowerBound()==0) {
        lower = smallest;
        upper=biggest;
        try  {
          DateTime d = Caster.toDate(Caster.toDouble(lower),true,null,null);
          lower = DateAdd.call(pageContext,"yyyy", -1, d).castToDoubleValue(lower)
        }
        catch (PageException e) {}
      }
      if(!Double.isNaN(scalefrom))lower=scalefrom;
      if(!Double.isNaN(scaleto))upper=scaleto;
      rangeAxis.setRange(new Range(lower,upper),true,true);
    }
    else if(plot instanceof XYPlot) {
      XYPlot cp=(XYPlot) plot;
      ValueAxis rangeAxis = cp.getRangeAxis();
      Range r=rangeAxis.getRange();
      double lower=r.getLowerBound();
      double upper=r.getUpperBound();
     
      if(labelFormat==LabelFormatUtil.LABEL_FORMAT_DATE && rangeAxis.getRange().getLowerBound()==0) {
        lower = smallest;
        upper=biggest;
        try  {
          DateTime d = Caster.toDate(Caster.toDouble(lower),true,null,null);
          lower = DateAdd.call(pageContext,"yyyy", -1, d).castToDoubleValue(lower)
        }
        catch (PageException e) {}
      }
      if(!Double.isNaN(scalefrom))lower=scalefrom;
View Full Code Here

                  ps.setPos(pos);
                  break;
                }
                else if(ps.isCurrent('}')) {
                  date.append('}');
                  DateTime d;
              try {
                d = DateCaster.toDateAdvanced(date.toString(), null);
              }
              catch (PageException e) {
                ps.setPos(pos);
View Full Code Here

TOP

Related Classes of railo.runtime.type.dt.DateTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.