This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
97 additions
and
2 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
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,31 @@ | ||
/** | ||
* Pour formater une date julienne. | ||
* @memberof acte | ||
* @access public | ||
* @since 0.0.15 | ||
* @author Gilles Toubiana | ||
* @see {@link https://github.com/gtoubiana/acte|Projet sur GitHub} | ||
* @license MIT | ||
* @param {String} [format='%Jp %Mlb %A'] - Le modèle de formatage.<br> | ||
* Voir [.gregorien](#acte.Jour+gregorien) pour la syntaxe. | ||
* @param {String} [erreur='Pas de correspondances.'] - Le message d'erreur | ||
* @param {Function} [rappel] - Une fonction de rappel | ||
* @return {String} La date julienne formatée | ||
* @example | ||
* new acte.Jour('1/1/1600').julien() // '22 décembre 1599' | ||
* new acte.Jour('').julien(0, 'Erreur.') // 'Erreur.' | ||
* new acte.Jour('3 avril 1605').julien('%Jz/%Mz', 0, ((res, obj) => { | ||
* const an = (obj.A % 100) < 10 ? `0${obj.A % 100}` : obj.A % 100; | ||
* return `${res}/${an}`; | ||
* }))) // '24/03/05' | ||
*/ | ||
acte.Jour.prototype.julien = function julien(format, erreur, rappel) { | ||
const resultat = formatageDeJour(format, erreur, rappel, | ||
'%Jp %Mlb %A', | ||
'Pas de correspondances.', | ||
this.variables.julien, | ||
'od', | ||
objGregorien); | ||
|
||
return resultat; | ||
}; |
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