forked from tidev/titanium-sdk
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TIMOB-9390: Blackberry: implement rest of String.formatXXX methods (o…
…ther than format) Reviewers: HarutM, JP ChangeLog: - Added new TiDateObject class. - Added new message constants. - Implemented formatDate, formatTime, formatCurrency, formatDecimal methods Test Cases: - Using sample tibbtest project create var with the value of Date - Use formatDate(date, [format]), formatTime(date, [format]) in app.js - Make sure string correctly formatted. - Try the same with previously changed language. - Create var with number value. - Use formatCurrency(number) in app.js - Make sure string correctly formatted. - Try the same with previously changed language. - Create var with number value. - Use formatDecimal(number, [locale], [pattern]) in app.js - Make sure string correctly formatted. - Try the same with previously changed language. NOTE: locale & pattern not yet implemented for formatDecimal
- Loading branch information
unknown
authored and
unknown
committed
Jun 11, 2012
1 parent
3c9409d
commit 99130f8
Showing
6 changed files
with
222 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#include "TiDateObject.h" | ||
|
||
TiDateObject::TiDateObject(NativeObjectFactory* objectFactory) | ||
: TiObject("Date") | ||
{ | ||
objectFactory_ = objectFactory; | ||
} | ||
|
||
TiDateObject::~TiDateObject() | ||
{ | ||
} | ||
|
||
void TiDateObject::addObjectToParent(TiObject* parent, NativeObjectFactory* objectFactory) | ||
{ | ||
TiDateObject* obj = new TiDateObject(objectFactory); | ||
parent->addMember(obj); | ||
obj->release(); | ||
} | ||
|
||
void TiDateObject::onCreateStaticMembers() | ||
{ | ||
} | ||
|
||
bool TiDateObject::canAddMembers() const | ||
{ | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#ifndef TIDATEOBJECT_H_ | ||
#define TIDATEOBJECT_H_ | ||
|
||
#include "TiObject.h" | ||
|
||
/* | ||
* TiDateObject | ||
*/ | ||
class TiDateObject : public TiObject | ||
{ | ||
public: | ||
static void addObjectToParent(TiObject* parent, NativeObjectFactory* objectFactory); | ||
|
||
protected: | ||
virtual ~TiDateObject(); | ||
virtual void onCreateStaticMembers(); | ||
virtual bool canAddMembers() const; | ||
|
||
private: | ||
explicit TiDateObject(); | ||
explicit TiDateObject(NativeObjectFactory* objectFactory); | ||
|
||
/* Not copiable; Not assignable */ | ||
TiDateObject(const TiDateObject& date); | ||
TiDateObject& operator=(const TiDateObject& date); | ||
|
||
NativeObjectFactory* objectFactory_; | ||
}; | ||
|
||
#endif /* TIDATEOBJECT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters