Time Generator | 1945min = 1d 8h 25m |

Započeo #Rakic, Decembar 13, 2017, 15:40:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Tip: Funkcija
Slike ili Video: Objasnjeno
Opis i dodatne informacije:

Dakle ovo je jednostavan generator minuta. Vas upisani broj se generise u godine mesece dane sate i minute.

Primeri:


[15:33:07]  [TIME_GEN] Enter minute: '60' | Generate: '1h '
[15:33:07]  [TIME_GEN_END] Minute '60' | Generate Time '0 ms'

[15:33:12]  [TIME_GEN] Enter minute: '120' | Generate: '2h '
[15:33:12]  [TIME_GEN_END] Minute '120' | Generate Time '0 ms'

[15:33:18]  [TIME_GEN] Enter minute: '2564' | Generate: '1d 18h 44m'
[15:33:18]  [TIME_GEN_END] Minute '2564' | Generate Time '0 ms'

[15:33:22]  [TIME_GEN] Enter minute: '25647' | Generate: '17d 19h 27m'
[15:33:22]  [TIME_GEN_END] Minute '25647' | Generate Time '0 ms'

[15:33:28]  [TIME_GEN] Enter minute: '9854' | Generate: '6d 20h 14m'
[15:33:28]  [TIME_GEN_END] Minute '9854' | Generate Time '0 ms'

[15:33:32]  [TIME_GEN] Enter minute: '985445' | Generate: '1g 10m 24d 8h 5m'
[15:33:32]  [TIME_GEN_END] Minute '985445' | Generate Time '10 ms'

[15:33:42]  [TIME_GEN] Enter minute: '98544' | Generate: '2m 8d 10h 24m'
[15:33:42]  [TIME_GEN_END] Minute '98544' | Generate Time '1 ms'



Download link: https://pastebin.com/jay7kCUx
Credits: #RAKIC



Lepo  8)
#ROBY
#ONLINE !
----- NIKAD PORAZ SAMO LEKCIJA! -----


Lijepo, pohvale ;)


UL:RP IP: 193.70.81.192:7777
UL:RP Forum: KLIK
OPIS UL:RP
UL:RP FaceBook Page: KLIK



Cool (Y), but

Trebao bi dopustiti korisnicima da formatiraju output kako žele, pri tome mislim da bi trebao returnati svaku varijablu, year, month, week, day, hour & second, te bi svatko mogao formatirati kako želi, i trebao bi raditi convert iz sekundi ne minuti, evo ti primjer iz sekundi convert u sate, minute i sekunde, dok bi godine radio trebas paziti na dane u mjesecu, te prijestupne godine, ali evo ti mali primjer koji napisah


stock ConvertSeconds(seconds, &H, &M, &S)
{
H = seconds / 3600;
M = (seconds % 3600) / 60;
S = (seconds % 3600) % 60;
}


Usage:


new hour, minute, second;

ConvertSeconds(4600, hour, minute, second);
printf("%02d:%02d:%02d", hour, minute, second);

ConvertSeconds(59, hour, minute, second);
printf("%02d:%02d:%02d", hour, minute, second);

ConvertSeconds(119, hour, minute, second);
printf("%02d:%02d:%02d", hour, minute, second);

ConvertSeconds(121, hour, minute, second);
printf("%02d:%02d:%02d", hour, minute, second);

ConvertSeconds(564654, hour, minute, second);
printf("%02d:%02d:%02d", hour, minute, second);
Poslednja Izmena: Decembar 13, 2017, 17:55:56 POSLE PODNE od Ino42O
Software Developer



GJ. :)
• Sve sam u stanju da pustim da ide
Nisam od onih što svima se svide. •



NE razumem
Scripter - Ventura Project
Ventura Project IP: 91.134.193.97:7790