 |
 |
 |
 |
 |
| Author |
Message |
Fly
Joined: 17 Sep 2008 Posts: 1
|
|
need a bit of help |
|
Just created my first item \o/, i dont know any script languages so dont laught at it
 |
 |
int s = ((Int32)GetData("Time.Seconds"));
int min = ((Int32)GetData("Time.Minute"));
int h = ((Int32)GetData("Time.Hour"));
int d = ((Int32)GetData("Date.Day"));
int m = ((Int32)GetData("Date.Month"));
int y = ((Int32)GetData("Date.Year"));
DateTime current = new DateTime(y, m, d, h, min, s);
DateTime boom = new DateTime(2008, 9, 28, 14, 30, 0); //particle collider fire date or whatever you want
TimeSpan left = boom.Subtract ( current );
return (left.ToString()); |
I'm using it to remind myself how much time left untill something happens (PoS runs out of fuel in eve online etc), but i have small problem the output it gives is something like xx.yy:yy:yy where xx is days left, and yy:yy:yy is hours,minutes,seconds left, is there anyway to format output? i want something like xx days yy hours left.
|
|
| Wed Sep 17, 2008 8:17 pm |
|
 |
spock
Site Admin

Joined: 17 Feb 2003 Posts: 4526 Location: Athens, Greece |
|
Sharp |
|
The script language is C#, so you can do a search on MSDN for string and date manipulation methods and functions.
Cheers!
_________________ Live long and prosper... |
|
| Thu Sep 18, 2008 12:42 am |
 |
 |
UNOPARATOR
Homo Moderatus

Joined: 19 Jul 2005 Posts: 915 Location: Istanbul, Turkey |
|
|
| Thu Sep 18, 2008 6:50 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
 |
 |
 |
|