|
Lines 1-13
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2008, 2011 Innoopract Informationssysteme GmbH. |
2 |
* Copyright (c) 2008, 2011 Innoopract Informationssysteme GmbH and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* Innoopract Informationssysteme GmbH - initial API and implementation |
9 |
* Innoopract Informationssysteme GmbH - initial API and implementation |
| 10 |
* EclipseSource - ongoing development |
10 |
* EclipseSource - ongoing development |
| 11 |
******************************************************************************/ |
11 |
******************************************************************************/ |
| 12 |
|
12 |
|
| 13 |
qx.Class.define( "org.eclipse.swt.widgets.DateTimeDate", { |
13 |
qx.Class.define( "org.eclipse.swt.widgets.DateTimeDate", { |
|
Lines 621-639
Link Here
|
| 621 |
var result = 31; |
621 |
var result = 31; |
| 622 |
var tmpMonth = this._monthInt - 1; |
622 |
var tmpMonth = this._monthInt - 1; |
| 623 |
var tmpYear = parseInt( this._yearTextField.getText(), 10 ); |
623 |
var tmpYear = parseInt( this._yearTextField.getText(), 10 ); |
| 624 |
var tmpDate = new Date(); |
624 |
var tmpDate = new Date( tmpYear, tmpMonth, 1 ); |
| 625 |
tmpDate.setYear( tmpYear ); |
|
|
| 626 |
tmpDate.setMonth( tmpMonth ); |
| 627 |
// Test 31 |
625 |
// Test 31 |
| 628 |
tmpDate.setDate( 31 ); |
626 |
tmpDate.setDate( 31 ); |
| 629 |
if( tmpDate.getMonth() != tmpMonth ) { |
627 |
if( tmpDate.getMonth() != tmpMonth ) { |
| 630 |
result = 30; |
628 |
result = 30; |
| 631 |
tmpDate.setMonth( tmpMonth ); |
629 |
tmpDate = new Date( tmpYear, tmpMonth, 1 ); |
| 632 |
// Test 30 |
630 |
// Test 30 |
| 633 |
tmpDate.setDate( 30 ); |
631 |
tmpDate.setDate( 30 ); |
| 634 |
if( tmpDate.getMonth() != tmpMonth ) { |
632 |
if( tmpDate.getMonth() != tmpMonth ) { |
| 635 |
result = 29; |
633 |
result = 29; |
| 636 |
tmpDate.setMonth( tmpMonth ); |
634 |
tmpDate = new Date( tmpYear, tmpMonth, 1 ); |
| 637 |
// Test 29 |
635 |
// Test 29 |
| 638 |
tmpDate.setDate( 29 ); |
636 |
tmpDate.setDate( 29 ); |
| 639 |
if( tmpDate.getMonth() != tmpMonth ) { |
637 |
if( tmpDate.getMonth() != tmpMonth ) { |