Package com.google.gwt.i18n.client

Examples of com.google.gwt.i18n.client.DateTimeFormat.format()


        // cambio formato data (es. con formato Standard: Wed Jun 26 17:41:38 CEST 2013)
        DateTimeFormat format = DateTimeFormat.getFormat("dd/MM/yyyy");
       
        // la stringa sTime sar� nulla nel caso in cui si decida di recuperare il momento dell'inserimento
        // dal Server, altrimenti avr� un formato simile al DateTime
        sTime = "&"+format.format(data.getValue())+"&"+hh.getText()+":"+mm.getText()+":"+ss.getText();
        }else{
        // il server si occupa di effettuare un controllo sul formato di sTime: nel caso in cui il suo
        // formato non sia 'HH:mm:ss' l'orario di inserimento viene preso da quello attuale del Server
          sTime = "";
        }
View Full Code Here


        Date date = null;
        String t = textWidget.getText();
        try {
            date = this.visualFormatFormatter.parse( t );
            DateTimeFormat formatter = DateTimeFormat.getFormat( defaultFormat );
            return formatter.format( date );
        } catch ( IllegalArgumentException iae ) {
            //The String failed to parse
        }
        return null;
    }
View Full Code Here

    public String getDateString() {
        String t = textWidget.getText();
        Date date = this.visualFormatFormatter.parse( t );
        DateTimeFormat formatter = DateTimeFormat.getFormat( defaultFormat );
        return formatter.format( date );
    }

    /**
     * Set the date from the dropdowns
     * @return
 
View Full Code Here

                                            //NOTE, GWTEXT only understands certain date formats, for example "yyyy/MM/dd"
                                            //works but other formats such as "yyyy/MM/dd" or localized formats  is not recognizable
                                            //by GWTEXT. See http://code.google.com/p/gwt-ext/issues/detail?id=459&start=100.
                                            DateTimeFormat format = DateTimeFormat.getFormat( "yyyy/MM/dd");
                                             //DateTimeFormat format = DateTimeFormat.getFullDateFormat();
                                            rowData[j] = format.format(dt);
                                         } else {
                                            rowData[j] = row.values[j - 2];
                                         }
                                     }
                                     gridData[i] = rowData;
View Full Code Here

                                                     int rowIndex,
                                                     int colNum,
                                                     Store store) {
                                    DateTimeFormat format = DateTimeFormat.getMediumDateFormat();// DateTimeFormat.getFormat( "MMM d, yyyy");
                                    //System.out.println("----format.format( (Date) value  )" + format.format( (Date) value  ));
                                    return format.format( (Date) value  );
                                }
                            } );
                        } else if ( header.equals( "Description" ) ) {
                            setHidden( true ); //don't want to show a separate description
                        }
View Full Code Here

    };

    // Get the current date and format it
    DateTimeFormat dateFormatter = new DateTimeFormat("yyyy-MM-dd HH:mm:ss") {
    };
    String creationDate = dateFormatter.format(new Date());

    // Tell the server to register the new user
    userService.signUp(name, email, username, password, cell, creationDate,
        callback);
  }
View Full Code Here

            // Get the current date and format it
            DateTimeFormat dateFormatter = new DateTimeFormat(
                "yyyy-MM-dd HH:mm:ss") {
            };
            String creationDate = dateFormatter.format(new Date());

            // Validate field values
            try {
              if (PdpScanner.projects.containsKey(name)) {
View Full Code Here

        projectTable.setText(row, 2,
            String.valueOf(p.getNloc(p.getVersionCount())));

      dateFormatter = new DateTimeFormat("dd/MM/yyyy, à HH:mm") {
      };
      projectTable.setText(row, 3, dateFormatter.format(d1));

      // Remove project button
      Button removeProjectButton = new Button("x");
      removeProjectButton.addStyleDependentName("remove");
      removeProjectButton.addClickHandler(new ClickHandler() {
View Full Code Here

                                            //NOTE, GWTEXT only understands certain date formats, for example "yyyy/MM/dd"
                                            //works but other formats such as "yyyy/MM/dd" or localized formats  is not recognizable
                                            //by GWTEXT. See http://code.google.com/p/gwt-ext/issues/detail?id=459&start=100.
                                            DateTimeFormat format = DateTimeFormat.getFormat( "yyyy/MM/dd HH:mm");
                                             //DateTimeFormat format = DateTimeFormat.getFullDateFormat();
                                            rowData[j] = format.format(dt);
                                         } else {
                                            rowData[j] = row.values[j - 2];
                                         }
                                     }
                                     gridData[i] = rowData;
View Full Code Here

                                                     int colNum,
                                                     Store store) {
                                    //DateTimeFormat format = DateTimeFormat.getMediumDateFormat();
                                  DateTimeFormat format = DateTimeFormat.getFormat( "yyyy/MM/dd HH:mm");
                                    //System.out.println("----format.format( (Date) value  )" + format.format( (Date) value  ));
                                    return format.format( (Date) value  );
                                }
                            } );
                        } else if ( header.equals( "Description" ) ) {
                            setHidden( true ); //don't want to show a separate description
                        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.