webOS Nation Forums >  Homebrew >  webOS patches > [patch] Date As Carrier String
[patch] Date As Carrier String

  Reply
 
LinkBack Thread Tools Display Modes
Old 09/20/2010, 07:43 PM   #121 (permalink)
Member
 
Join Date: Apr 2010
Posts: 19
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default My mods to the date string

Running 1.4.5 on my pre with Date as Carrier String patch installed.

I run a large font and on occasion the date string runs into the time string.

I changed the date format by editing
/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js

I added the following function:
Code:
myFormattedDate: function() {
    var myDayLabels   = new Array("Su", "M", "Tu", "W", "Th", "F", "Sa");
    var myMonthLabels = new Array("Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec");
    var myDate        = new Date();

    var myDayLabel    = myDayLabels[myDate.getDay()];
    var myDayOfMonth  = myDate.getDate();
    var myMonthLabel  = myMonthLabels[myDate.getMonth()];
    var my2DigitYear  = myDate.getFullYear()%100;

    // Tu 21 Sept 10
    return String(myDayLabel+" "+myDayOfMonth+" "+myMonthLabel+" "+my2DigitYear);
},

and then changed
Code:
     this.carrierText = new Date().toDateString();
to
Code:
     this.carrierText = this.myFormattedDate();
in the five places it occurs.

It looks like this now:


Last edited by freddysmith; 09/28/2010 at 03:09 PM. Reason: comment the function
freddysmith is offline   Reply With Quote
Old 09/23/2010, 10:40 PM   #122 (permalink)
Member
 
Quills's Avatar
 
Join Date: Aug 2010
Posts: 141
Likes Received: 15
Thanks: 45
Thanked 28 Times in 22 Posts
Default

Can someone make the date as carrier string without year and month (e.g., "Sun 12", "Mon 13", "Tue 14", etc.)?
Quills is offline   Reply With Quote
Old 10/08/2010, 02:05 PM   #123 (permalink)
Vij
Member
 
Vij's Avatar
 
Join Date: Jul 2009
Location: Toronto, ON, Canada
Posts: 272
Likes Received: 13
Thanks: 279
Thanked 30 Times in 23 Posts
Default

Quote:
Originally Posted by Jason Robitaille View Post
Though I believe now, in total, there are 4 Date As Carrier String patches/variants:
  • Date As Carrier String
  • Date As Carrier String No Year
  • Date As Carrier String No Year With Time Shown While Locked
  • Date As Carrier String With Time Shown While Locked

In Preware I see #1, #2, #4... but not #3. If figures that #3 is the one I am after :-)

Edit: Ahh i found it here. Installing via Internalz. Seems it got missed in the Preware upload?
http://forums.precentral.net/webos-p...ml#post2619514

Thanks folks!
__________________
Vij is offline   Reply With Quote
Old 02/12/2011, 04:35 AM   #124 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

Here's my patches for webOS 2.0.1
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 10/12/2011, 06:16 PM   #125 (permalink)
Member
 
Join Date: May 2010
Posts: 2
Likes Received: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Jason,

I would love to use your patch "date-as-carrier-string.patch" or "date-as-carrier-string-no-year.patch."

I am using webos 2.2 on my new Palm 3 and am getting errors when I try to install the above patches (for webOS 2.0.1).

Is there an update? Anybody successful with webOS 2.2+?

Thanks so much,
Christy
willcomm is offline   Reply With Quote
Old 10/12/2011, 06:31 PM   #126 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,956 Times in 1,495 Posts
Default

the patch version on the 2.2.x patch feeds works fine on my Pre3
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/webos-patches/217215-patch-date-carrier-string.html
Posted By For Type Date
dBsooner's webOS-Patches Web Portal This thread Refback 05/17/2010 01:21 AM


 


Content Relevant URLs by vBSEO 3.6.0