Accueil > > > CLASSE MOMENT V2.0
CLASSE MOMENT V2.0
Information sur la source
Description
ABSTRACT:
Lors de divers programmes de tous types, il est extrêmement courant d'avoir recours à une ligne du temps: pour retenir l'heure d'un événement, afficher l'heure courante du système, connaître le jour de la semaine d'une date particulière, connaître l'heure sur un autre fuseau horaire, et faire diverses opérations sur ces moments. C'est dans cette optique que j'ai décidé de développer la classe Moment, utile pour de très nombreuses applications. J'ai également accordé beaucoup d'importance à l'affichage des instances sous diverses formes au moyen d'une notion de pattern.
Il s'agit ici de la version 2.0, la version 1.0 est une vieille version officiellement non disponible, mais elle fait partie de mes autres sources sur ce site. De nombreuses améliorations sont encore à envisager (toute bonne idée est évidemment la bienvenue).
Le fonctionnement général de cette classe est basé sur le nombre de millisecondes écoulées depuis le premier janvier 1600 à 0h00'00"000. Une conversion dans des variables intuitives (année, mois, jour, jour de la semaine, heure, minute, seconde et milliseconde) est générée à chaque modification de cette variable, en tenant compte du fuseau horaire et du passage aux heures d'été.
J'ai choisi de limiter la remontée dans le temps à l'an 1600 pour une raison très simple: Le calendrier que nous utilisons, qui a débuté au XVème siècle, est basé sur des cycles de 400 ans. En effet, une année est bissextile si elle est un multiple de 4, exception faite des années multiples de 100, cette exception étant levée pour les années multiples de 400. L'an 1600 est la première année débutant un cycle de 400 ans qui suit l'établissement du calendrier actuel. Il serait erroné de regarder les années précédentes avec le calendrier actuel, et il serait pénible d'implémenter un autre calendrier pour ces années là (du moins dans cette version-ci).
Source
- /*
- * moment.h -- Project Moment v2.0
- *
- * Created by Christophe Dumeunier on 09/02/09.
- * Copyright 2009 Christophe Dumeunier. All rights reserved.
- * This file is free; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Créé par Christophe Dumeunier le 09/02/09.
- * Copyright 2009 Christophe Dumeunier. Tous droits réservés.
- * Ce fichier est gratuit; vous pouvez le redistribuer et/ou le modifier
- * selon les termes de la licence générale publique GNU publiée par
- * la Free Software Fondation; à partir de la version 2 de cette licence.
- *
- * Contact: christophe.dumeunier@gmail.com
- *
- */
-
- #ifndef _MOMENT_H
- #define _MOMENT_H
-
- #include <iostream>
- using namespace std;
-
- #define JANUARY 1
- #define FEBRUARY 2
- #define MARCH 3
- #define APRIL 4
- #define MAY 5
- #define JUNY 6
- #define JULY 7
- #define AUGUST 8
- #define SEPTEMBER 9
- #define OCTOBER 10
- #define NOVEMBER 11
- #define DECEMBER 12
-
- #define SUNDAY 0
- #define MONDAY 1
- #define TUESDAY 2
- #define WEDNESDAY 3
- #define THURSDAY 4
- #define FRIDAY 5
- #define SATERDAY 6
- #define MIN_DAY_OF_WEEK SUNDAY
- #define MAX_DAY_OF_WEEK SATERDAY
-
- #define LANG_ENGLISH 0
- #define LANG_FRENCH 1
- #define LANG_DUTCH 2
- #define LANG_GERMAN 3
- #define LANG_ITALIAN 4
- #define LANG_SPANISH 5
- #define NBR_LANG 6
-
- #define UNIT_MILLISECOND 1
- #define UNIT_SECOND 2
- #define UNIT_MINUTE 3
- #define UNIT_HOUR 4
- #define UNIT_DAY 5
- #define UNIT_WEEK 6 // 7 jours
- #define UNIT_SHORT_MONTH 7 // 28 jours
- #define UNIT_SPECIAL_MONTH 8 // 29 jours
- #define UNIT_NORMAL_MONTH 9 // 30 jours
- #define UNIT_LONG_MONTH 10 // 31 jours
- #define UNIT_MEAN_MONTH 11 // 30.436875 jours
- #define UNIT_NORMAL_YEAR 12 // 365 jours
- #define UNIT_LONG_YEAR 13 // 366 jours
- #define UNIT_MEAN_YEAR 14 // 365.2425 jours
- #define MIN_UNIT UNIT_MILLISECOND
- #define MAX_UNIT UNIT_MEAN_YEAR
-
- #define TIME_ZONE_MIDWAY -660
- #define TIME_ZONE_HAWAII -600
- #define TIME_ZONE_ALASKA -540
- #define TIME_ZONE_TIJUANA -480
- #define TIME_ZONE_ARIZONA -420
- #define TIME_ZONE_MEXICO -360
- #define TIME_ZONE_BOGOTA -300
- #define TIME_ZONE_CARACAS -270
- #define TIME_ZONE_SANTIAGO -240
- #define TIME_ZONE_TERRE_NEUVE -210
- #define TIME_ZONE_BRASILIA -180
- #define TIME_ZONE_ATLANTIQUE -120
- #define TIME_ZONE_CAP_VERT -60
- #define TIME_ZONE_LONDRES 0
- #define TIME_ZONE_PARIS 60
- #define TIME_ZONE_BUCAREST 120
- #define TIME_ZONE_MOSCOU 180
- #define TIME_ZONE_TEHERAN 210
- #define TIME_ZONE_BAKU 240
- #define TIME_ZONE_KABOUL 270
- #define TIME_ZONE_ISLAMABAD 300
- #define TIME_ZONE_CALCUTTA 330
- #define TIME_ZONE_KATMANDOU 345
- #define TIME_ZONE_ASTANA 360
- #define TIME_ZONE_RANGOON 390
- #define TIME_ZONE_HANOI 420
- #define TIME_ZONE_PEKIN 480
- #define TIME_ZONE_TOKYO 540
- #define TIME_ZONE_DARWIN 570
- #define TIME_ZONE_SYDNEY 600
- #define TIME_ZONE_NOUVELLE_CALEDONIE 660
- #define TIME_ZONE_WELLINGTON 720
- #define TIME_ZONE_NUKUALOFA 780
- #define MIN_TIME_ZONE TIME_ZONE_MIDWAY
- #define MAX_TIME_ZONE TIME_ZONE_NUKUALOFA
-
- #define MIN_MILLISECOND 0
- #define MAX_MILLISECOND 999
- #define MIN_SECOND 0
- #define MAX_SECOND 59
- #define MIN_MINUTE 0
- #define MAX_MINUTE 59
- #define MIN_HOUR 0
- #define MAX_HOUR 23
- #define MIN_DAY 1
- #define MAX_DAY 31
- #define MIN_MONTH JANUARY
- #define MAX_MONTH DECEMBER
- #define MIN_YEAR 1600
- #define MAX_YEAR 59999
-
- #define LEAP_CYCLE 4
- #define LEAP_EXCEPTION_CYCLE 100
- #define LEAP_EXCEPTION2_CYCLE 400
-
- #define NBR_MILLISECONDS_IN_SECOND 1000
- #define NBR_MILLISECONDS_IN_MINUTE 60000
- #define NBR_MILLISECONDS_IN_HOUR 3600000
- #define NBR_MILLISECONDS_IN_DAY 86400000
- #define NBR_MILLISECONDS_IN_WEEK 604800000
- #define NBR_SECONDS_IN_MINUTE 60
- #define NBR_SECONDS_IN_HOUR 3600
- #define NBR_SECONDS_IN_DAY 86400
- #define NBR_SECONDS_IN_WEEK 604800
- #define NBR_SECONDS_IN_NORMAL_YEAR 31536000
- #define NBR_SECONDS_IN_LONG_YEAR 31622400
- #define NBR_SECONDS_IN_NORMAL_CYCLE_4_YEARS 126230400
- #define NBR_SECONDS_IN_SHORT_CYCLE_4_YEARS 126144000
- #define NBR_MINUTES_IN_HOUR 60
- #define NBR_DAYS_IN_WEEK 7
- #define NBR_DAYS_LONG_MONTH 31
- #define NBR_DAYS_NORMAL_MONTH 30
- #define NBR_DAYS_SHORT_MONTH 28
- #define NBR_DAYS_MEAN_MONTH 30.436875
- #define NBR_DAYS_SPECIAL_MONTH 29
- #define NBR_DAYS_IN_NORMAL_YEAR 365
- #define NBR_DAYS_IN_LONG_YEAR 366
- #define NBR_DAYS_IN_MEAN_YEAR 365.2425
- #define NBR_DAYS_IN_NORMAL_CYCLE_4_YEARS 1461
- #define NBR_DAYS_IN_SHORT_CYCLE_4_YEARS 1460
- #define NBR_DAYS_IN_NORMAL_CYCLE_100_YEARS 36524
- #define NBR_DAYS_IN_LONG_CYCLE_100_YEARS 36525
- #define NBR_DAYS_IN_CYCLE_400_YEARS 146097
- #define NBR_DAYS_TO_EPOCH 135140
-
- #define DEFAULT_UNIT UNIT_SECOND
- #define DEFAULT_LANG LANG_ENGLISH
- #define DEFAULT_TIME_ZONE TIME_ZONE_LONDRES
- #define DEFAULT_SUMMER_TIME_ACTIVE false
- #define DEFAULT_PATTERN "#DD-#MN-#YYYY #HH:#MM:#SS"
- #define DEFAULT_ORIGIN_TIME 0
- #define DEFAULT_ORIGIN_MILLISECOND 0
-
- class Moment;
- class MomentPattern;
- class MagicOstreamPattern;
-
- //----------
- //----------
-
- class MomentPattern
- {
- private:
-
- string pattern;
- unsigned short lang;
-
- public:
-
- MomentPattern(const string&,unsigned short);
- bool operator==(const MomentPattern&);
-
- string getPattern() const;
- unsigned short getLanguage() const;
- void printMoment(ostream&,const Moment&) const;
- MagicOstreamPattern operator,(ostream&) const;
-
- };
-
- //----------
- //----------
-
- class MagicOstreamPattern
- {
- private:
-
- ostream* ptr_flux;
- MomentPattern pat;
-
- public:
-
- MagicOstreamPattern(ostream*,MomentPattern);
- ~MagicOstreamPattern();
-
- MagicOstreamPattern operator<<(const Moment&);
- template<class T> MagicOstreamPattern operator<<(const T& t) { *ptr_flux << t; return *this; }
-
- };
-
- //----------
- //----------
-
- class Moment
- {
- private:
-
- unsigned long long total_milliseconds;
- unsigned short year;
- unsigned short month;
- unsigned short day_of_month;
- unsigned short day_of_week;
- unsigned short hour;
- unsigned short minute;
- unsigned short second;
- unsigned short millisecond;
- short time_zone;
-
- static unsigned short unit;
- static short default_time_zone;
- static bool summer_time_is_active;
- static MomentPattern pattern;
- static unsigned long long origin_time;
-
- public:
-
- Moment();
- Moment(unsigned long long);
- Moment(unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short);
- Moment(const Moment&);
- Moment& operator=(const Moment&);
- ~Moment();
-
- static unsigned short getUnit();
- static bool setUnit(unsigned short);
- static short getDefaultTimeZone();
- static bool setDefaultTimeZone(short);
- static bool summerTimeIsActive();
- static void setSummerTimeActive();
- static void setSummerTimeUnactive();
- static MomentPattern getPattern();
- static void printPattern(ostream&);
- static void setPattern(const MomentPattern&);
- static Moment getOrigin();
- static void setOrigin(const Moment&);
-
- short getTimeZone() const;
- bool setTimeZone(short);
- bool setTimeZoneWithoutAlterTime(short);
-
- unsigned long long getTotalMilliseconds() const;
- unsigned short getYear() const;
- unsigned short getMonth() const;
- unsigned short getDayOfMonth() const;
- unsigned short getDayOfWeek() const;
- unsigned short getHour() const;
- unsigned short getMinute() const;
- unsigned short getSecond() const;
- unsigned short getMillisecond() const;
- bool setTotalMilliseconds(unsigned long long);
- bool setYear(unsigned short);
- bool setMonth(unsigned short);
- bool setDayOfMonth(unsigned short);
- bool setDate(unsigned short,unsigned short,unsigned short);
- bool setHour(unsigned short);
- bool setMinute(unsigned short);
- bool setSecond(unsigned short);
- bool setMillisecond(unsigned short);
- bool setTime(unsigned short,unsigned short,unsigned short,unsigned short);
- bool setValues(unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short);
-
- bool operator==(const Moment&) const;
- bool operator!=(const Moment&) const;
- bool operator<(const Moment&) const;
- bool operator>(const Moment&) const;
- bool operator<=(const Moment&) const;
- bool operator>=(const Moment&) const;
-
- double operator-(const Moment&) const;
- Moment operator+(double) const;
- Moment operator-(double) const;
- void operator+=(double);
- void operator-=(double);
- Moment operator++();
- Moment operator++(int);
- Moment operator--();
- Moment operator--(int);
-
- bool jumpToFollowingDayOfWeek(unsigned short);
- bool jumpToPreviousDayOfWeek(unsigned short);
- Moment operator+() const;
- Moment operator-() const;
- Moment operator*(double) const;
- Moment operator/(double) const;
- void operator*=(double);
- void operator/=(double);
-
- void update();
-
- private:
-
- void convertToMilliseconds();
- void convertFromMilliseconds();
-
- };
-
- ostream& operator<<(ostream&,const Moment&);
-
- #endif
/*
* moment.h -- Project Moment v2.0
*
* Created by Christophe Dumeunier on 09/02/09.
* Copyright 2009 Christophe Dumeunier. All rights reserved.
* This file is free; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Créé par Christophe Dumeunier le 09/02/09.
* Copyright 2009 Christophe Dumeunier. Tous droits réservés.
* Ce fichier est gratuit; vous pouvez le redistribuer et/ou le modifier
* selon les termes de la licence générale publique GNU publiée par
* la Free Software Fondation; à partir de la version 2 de cette licence.
*
* Contact: christophe.dumeunier@gmail.com
*
*/
#ifndef _MOMENT_H
#define _MOMENT_H
#include <iostream>
using namespace std;
#define JANUARY 1
#define FEBRUARY 2
#define MARCH 3
#define APRIL 4
#define MAY 5
#define JUNY 6
#define JULY 7
#define AUGUST 8
#define SEPTEMBER 9
#define OCTOBER 10
#define NOVEMBER 11
#define DECEMBER 12
#define SUNDAY 0
#define MONDAY 1
#define TUESDAY 2
#define WEDNESDAY 3
#define THURSDAY 4
#define FRIDAY 5
#define SATERDAY 6
#define MIN_DAY_OF_WEEK SUNDAY
#define MAX_DAY_OF_WEEK SATERDAY
#define LANG_ENGLISH 0
#define LANG_FRENCH 1
#define LANG_DUTCH 2
#define LANG_GERMAN 3
#define LANG_ITALIAN 4
#define LANG_SPANISH 5
#define NBR_LANG 6
#define UNIT_MILLISECOND 1
#define UNIT_SECOND 2
#define UNIT_MINUTE 3
#define UNIT_HOUR 4
#define UNIT_DAY 5
#define UNIT_WEEK 6 // 7 jours
#define UNIT_SHORT_MONTH 7 // 28 jours
#define UNIT_SPECIAL_MONTH 8 // 29 jours
#define UNIT_NORMAL_MONTH 9 // 30 jours
#define UNIT_LONG_MONTH 10 // 31 jours
#define UNIT_MEAN_MONTH 11 // 30.436875 jours
#define UNIT_NORMAL_YEAR 12 // 365 jours
#define UNIT_LONG_YEAR 13 // 366 jours
#define UNIT_MEAN_YEAR 14 // 365.2425 jours
#define MIN_UNIT UNIT_MILLISECOND
#define MAX_UNIT UNIT_MEAN_YEAR
#define TIME_ZONE_MIDWAY -660
#define TIME_ZONE_HAWAII -600
#define TIME_ZONE_ALASKA -540
#define TIME_ZONE_TIJUANA -480
#define TIME_ZONE_ARIZONA -420
#define TIME_ZONE_MEXICO -360
#define TIME_ZONE_BOGOTA -300
#define TIME_ZONE_CARACAS -270
#define TIME_ZONE_SANTIAGO -240
#define TIME_ZONE_TERRE_NEUVE -210
#define TIME_ZONE_BRASILIA -180
#define TIME_ZONE_ATLANTIQUE -120
#define TIME_ZONE_CAP_VERT -60
#define TIME_ZONE_LONDRES 0
#define TIME_ZONE_PARIS 60
#define TIME_ZONE_BUCAREST 120
#define TIME_ZONE_MOSCOU 180
#define TIME_ZONE_TEHERAN 210
#define TIME_ZONE_BAKU 240
#define TIME_ZONE_KABOUL 270
#define TIME_ZONE_ISLAMABAD 300
#define TIME_ZONE_CALCUTTA 330
#define TIME_ZONE_KATMANDOU 345
#define TIME_ZONE_ASTANA 360
#define TIME_ZONE_RANGOON 390
#define TIME_ZONE_HANOI 420
#define TIME_ZONE_PEKIN 480
#define TIME_ZONE_TOKYO 540
#define TIME_ZONE_DARWIN 570
#define TIME_ZONE_SYDNEY 600
#define TIME_ZONE_NOUVELLE_CALEDONIE 660
#define TIME_ZONE_WELLINGTON 720
#define TIME_ZONE_NUKUALOFA 780
#define MIN_TIME_ZONE TIME_ZONE_MIDWAY
#define MAX_TIME_ZONE TIME_ZONE_NUKUALOFA
#define MIN_MILLISECOND 0
#define MAX_MILLISECOND 999
#define MIN_SECOND 0
#define MAX_SECOND 59
#define MIN_MINUTE 0
#define MAX_MINUTE 59
#define MIN_HOUR 0
#define MAX_HOUR 23
#define MIN_DAY 1
#define MAX_DAY 31
#define MIN_MONTH JANUARY
#define MAX_MONTH DECEMBER
#define MIN_YEAR 1600
#define MAX_YEAR 59999
#define LEAP_CYCLE 4
#define LEAP_EXCEPTION_CYCLE 100
#define LEAP_EXCEPTION2_CYCLE 400
#define NBR_MILLISECONDS_IN_SECOND 1000
#define NBR_MILLISECONDS_IN_MINUTE 60000
#define NBR_MILLISECONDS_IN_HOUR 3600000
#define NBR_MILLISECONDS_IN_DAY 86400000
#define NBR_MILLISECONDS_IN_WEEK 604800000
#define NBR_SECONDS_IN_MINUTE 60
#define NBR_SECONDS_IN_HOUR 3600
#define NBR_SECONDS_IN_DAY 86400
#define NBR_SECONDS_IN_WEEK 604800
#define NBR_SECONDS_IN_NORMAL_YEAR 31536000
#define NBR_SECONDS_IN_LONG_YEAR 31622400
#define NBR_SECONDS_IN_NORMAL_CYCLE_4_YEARS 126230400
#define NBR_SECONDS_IN_SHORT_CYCLE_4_YEARS 126144000
#define NBR_MINUTES_IN_HOUR 60
#define NBR_DAYS_IN_WEEK 7
#define NBR_DAYS_LONG_MONTH 31
#define NBR_DAYS_NORMAL_MONTH 30
#define NBR_DAYS_SHORT_MONTH 28
#define NBR_DAYS_MEAN_MONTH 30.436875
#define NBR_DAYS_SPECIAL_MONTH 29
#define NBR_DAYS_IN_NORMAL_YEAR 365
#define NBR_DAYS_IN_LONG_YEAR 366
#define NBR_DAYS_IN_MEAN_YEAR 365.2425
#define NBR_DAYS_IN_NORMAL_CYCLE_4_YEARS 1461
#define NBR_DAYS_IN_SHORT_CYCLE_4_YEARS 1460
#define NBR_DAYS_IN_NORMAL_CYCLE_100_YEARS 36524
#define NBR_DAYS_IN_LONG_CYCLE_100_YEARS 36525
#define NBR_DAYS_IN_CYCLE_400_YEARS 146097
#define NBR_DAYS_TO_EPOCH 135140
#define DEFAULT_UNIT UNIT_SECOND
#define DEFAULT_LANG LANG_ENGLISH
#define DEFAULT_TIME_ZONE TIME_ZONE_LONDRES
#define DEFAULT_SUMMER_TIME_ACTIVE false
#define DEFAULT_PATTERN "#DD-#MN-#YYYY #HH:#MM:#SS"
#define DEFAULT_ORIGIN_TIME 0
#define DEFAULT_ORIGIN_MILLISECOND 0
class Moment;
class MomentPattern;
class MagicOstreamPattern;
//----------
//----------
class MomentPattern
{
private:
string pattern;
unsigned short lang;
public:
MomentPattern(const string&,unsigned short);
bool operator==(const MomentPattern&);
string getPattern() const;
unsigned short getLanguage() const;
void printMoment(ostream&,const Moment&) const;
MagicOstreamPattern operator,(ostream&) const;
};
//----------
//----------
class MagicOstreamPattern
{
private:
ostream* ptr_flux;
MomentPattern pat;
public:
MagicOstreamPattern(ostream*,MomentPattern);
~MagicOstreamPattern();
MagicOstreamPattern operator<<(const Moment&);
template<class T> MagicOstreamPattern operator<<(const T& t) { *ptr_flux << t; return *this; }
};
//----------
//----------
class Moment
{
private:
unsigned long long total_milliseconds;
unsigned short year;
unsigned short month;
unsigned short day_of_month;
unsigned short day_of_week;
unsigned short hour;
unsigned short minute;
unsigned short second;
unsigned short millisecond;
short time_zone;
static unsigned short unit;
static short default_time_zone;
static bool summer_time_is_active;
static MomentPattern pattern;
static unsigned long long origin_time;
public:
Moment();
Moment(unsigned long long);
Moment(unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short);
Moment(const Moment&);
Moment& operator=(const Moment&);
~Moment();
static unsigned short getUnit();
static bool setUnit(unsigned short);
static short getDefaultTimeZone();
static bool setDefaultTimeZone(short);
static bool summerTimeIsActive();
static void setSummerTimeActive();
static void setSummerTimeUnactive();
static MomentPattern getPattern();
static void printPattern(ostream&);
static void setPattern(const MomentPattern&);
static Moment getOrigin();
static void setOrigin(const Moment&);
short getTimeZone() const;
bool setTimeZone(short);
bool setTimeZoneWithoutAlterTime(short);
unsigned long long getTotalMilliseconds() const;
unsigned short getYear() const;
unsigned short getMonth() const;
unsigned short getDayOfMonth() const;
unsigned short getDayOfWeek() const;
unsigned short getHour() const;
unsigned short getMinute() const;
unsigned short getSecond() const;
unsigned short getMillisecond() const;
bool setTotalMilliseconds(unsigned long long);
bool setYear(unsigned short);
bool setMonth(unsigned short);
bool setDayOfMonth(unsigned short);
bool setDate(unsigned short,unsigned short,unsigned short);
bool setHour(unsigned short);
bool setMinute(unsigned short);
bool setSecond(unsigned short);
bool setMillisecond(unsigned short);
bool setTime(unsigned short,unsigned short,unsigned short,unsigned short);
bool setValues(unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short,unsigned short);
bool operator==(const Moment&) const;
bool operator!=(const Moment&) const;
bool operator<(const Moment&) const;
bool operator>(const Moment&) const;
bool operator<=(const Moment&) const;
bool operator>=(const Moment&) const;
double operator-(const Moment&) const;
Moment operator+(double) const;
Moment operator-(double) const;
void operator+=(double);
void operator-=(double);
Moment operator++();
Moment operator++(int);
Moment operator--();
Moment operator--(int);
bool jumpToFollowingDayOfWeek(unsigned short);
bool jumpToPreviousDayOfWeek(unsigned short);
Moment operator+() const;
Moment operator-() const;
Moment operator*(double) const;
Moment operator/(double) const;
void operator*=(double);
void operator/=(double);
void update();
private:
void convertToMilliseconds();
void convertFromMilliseconds();
};
ostream& operator<<(ostream&,const Moment&);
#endif
Historique
- 17 février 2009 15:56:58 :
- Edition du texte de présentation.
- 17 février 2009 16:20:36 :
- Zip sans les fichiers Mac OS X
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Récupération de la date et heure de cration d'un fichier [ par MELISA ]
Bonjour à tousJ'essaie de récupérer la date et heure de création d'un fichier.Existe-t-il déjà une API à intégrer?Merci beaucoup pour votre aide.MELIS
transformation d'une date et heure en lettres [ par Philuch ]
Philuchsalut!!J'ai besoin d'une aide urgente. Je recherche une fonction qui permettra de transformer une
date et heure d'un fichier sur cd-rom [ par shinevilkyo ]
bonjour,je cherche a connaitre la date et l heure de creation d'un fichier qui ce trouve sur un cd-rom et po sur un disk dur car j ai essai avec les f
modif de la date et de l'heure system [ par bwoufy86 ]
Voila, je cherche a faire un soft en c++ ou je peux changer la date et l'heure system.J pensée utilisé la cde system("xxx");mais je trouve po ca jolie
C++ Builder Date/heure [ par brums972 ]
salut, j'aimerai savoir comment calculer le tps écoulé en deux date/heure sous le format 02/03/2004 05:34 et 11/03/2004 14:58, avec quelle fonction je
Comment restituer une date ou heure dans un Edit en API [ par LaPatoshe ]
Encore bonjour à tous. Je cherche à récupérer la date du jour et l'heure et les restituer dans des zones d'édition.J'ai tenté l'opération en créant un
langage C [ par wesslett ]
je suis débutant et nouveau dans ce forum ....!! Comment peut on afficher la date et l' heure lors d'une saisie de donné
pb d'affichage de DATE HEURE (Dev-CPP) [ par phenX ]
Pour pouvoir afficher la date dans un fichier texte, je fait: fprintf(fichier,"%d\t\t", time(&H) et j'obtiens, dans le fichier: 1129296004 qui do
Comparaison de date et heure [ par albertusse ]
Quelqu'un aurait t-il un source qui permete de compararé deux date/heure Merci. Albertusse
recuperation heure et date [ par ancat ]
Bonsoir, es-ce qu'il existe une fonction permettant de recupere l'heure en win 32?MerciBye ANCAT[font=Comic Sans MS]
|
Derniers Blogs
[WP7] UTILISER UN WRAPPANEL DANS UNE APPLICATION WINDOWS PHONE 7[WP7] UTILISER UN WRAPPANEL DANS UNE APPLICATION WINDOWS PHONE 7 par Audrey
Lors de la réalisation de ma 2ème application Windows Phone 7, j'ai souhaité utiliser un WrapPanel pour afficher plusieurs photos. Mais le contrôle WrapPanel ne fait pas parti de la liste des contrôles inclus dans le SDK de la version Beta des outils pour...
Cliquez pour lire la suite de l'article par Audrey [WP7] BESOIN D'AVOIR DES DONNéES EN CACHE[WP7] BESOIN D'AVOIR DES DONNéES EN CACHE par Nicolas
Les développeurs ASP.NET ont l'habitude de mettre des données en cache pour éviter de requêter a chaque fois la base de données. Et il est toujours utilie de penser que vos utilisateurs mobiles n'ont pas troujours une super connexion 3G/WIFI et un for...
Cliquez pour lire la suite de l'article par Nicolas [TFS] COMMENT FORCER LA SAISIE D'UN AREA OU ITERATION[TFS] COMMENT FORCER LA SAISIE D'UN AREA OU ITERATION par cyril
Lorsque l'on créé un Work Item dans TFS, il est possible de le classer dans un "area" et dans une "iteration". Dans la plupart des types de projet, un "area" correspond à une catégorie, une "iteration" à un numéro de version. Il est possible de cré...
Cliquez pour lire la suite de l'article par cyril SQL : FONCTIONS D'AGRéGATION MIN/MAX ET VALEURS NULLSQL : FONCTIONS D'AGRéGATION MIN/MAX ET VALEURS NULL par coq
Les fonctions d'agrégation comme MIN et MAX ignorent les valeurs NULL présentes dans le jeu de données sur lequel porte leur calcul, d'où le fameux message d'avertissement : Warning: Null value is eliminated by an aggregate or other SET operation...
Cliquez pour lire la suite de l'article par coq VOTEZ POUR WARNYGOVOTEZ POUR WARNYGO par Nicolas
La vidéo du projet Warnygo est disponible sur facebook et attend vos votes ! Pour rappel: Warnygo est une application Windows Phone 7 qui permet d'alerter tous utilisateurs inscrits qui se trouve dans la zone où se passe l'...
Cliquez pour lire la suite de l'article par Nicolas
Logiciels
sDEVIS-FACTURES vlPRO (3.8.0)SDEVIS-FACTURES VLPRO (3.8.0)sDEVIS-FACTURES vlPRO a été mis au point pour permettre besoins des particuliers, créateurs, entr... Cliquez pour télécharger sDEVIS-FACTURES vlPRO LettresFaciles (5.6.0)LETTRESFACILES (5.6.0)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles MyPlanning 2010 (5.6.0)MYPLANNING 2010 (5.6.0)MyPlanning 2010 permet de créer des plannings sous la représentation de diagrammes. Plannings pré... Cliquez pour télécharger MyPlanning 2010 Emicsoft Mac DVD en iPad Convertisseur (3.1.16)EMICSOFT MAC DVD EN IPAD CONVERTISSEUR (3.1.16)Emicsoft Mac DVD en iPad Convertisseur, logiciel professionnel de convertir les fichiers DVD en i... Cliquez pour télécharger Emicsoft Mac DVD en iPad Convertisseur Emicsoft ipad ménager pour mac (3.1.08)EMICSOFT IPAD MéNAGER POUR MAC (3.1.08)Emicsoft ipad ménager pour mac est spécialement conçu pour les utilisateurs Mac pour copier des f... Cliquez pour télécharger Emicsoft ipad ménager pour mac
|