Plugin Directory

Changeset 1174709


Ignore:
Timestamp:
06/04/2015 07:44:14 PM (11 years ago)
Author:
doddo
Message:

added some doc.

Location:
wp-stardate/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-stardate/trunk/readme.txt

    r1161885 r1174709  
    44Requires at least: 4.0.1
    55Tested up to: 4.2.2
    6 Stable tag: 1.0
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717* Filter various date functions, to have them display stardate instead, or filter nothing at all, and use the...
    1818* `<?php the_stardate() ?>` function (or `<?pgp get_the_stardate() ?>`) inside of your themes, to get posts stardate.
    19 * Aapproximate stardate based on several different formulas and variants and sources (like trekguide and wikipedia), including XI (for modern movies) as well as Classic (from TNG, VOY ...).
     19* Aapproximate stardate based on several different formulas and variants and sources (like trekguide and wikipedia), including XI (for modern movies), Star Trek Online, as well as Classic (from TNG, VOY ...).
    2020* Shortcodes: `[stardate]` will expand to the current timestamp in stardate fmt.
    2121
     
    3939== Changelog ==
    4040
     41= 1.0.1 =
     42Added Star Trek Online (SOL) stardate fmt. from comment by MartinSayles
     43
    4144= 1.0 =
    4245Initial release.
  • wp-stardate/trunk/stardate.php

    r1174702 r1174709  
    220220        $stardate = mysql2date("Y.z", $date);
    221221    } elseif ($style == 'SOL') {
    222         /* Represent the current date in YYMM.DD format, where "YY" is the current year minus 1900,
    223          * MM is the current month (01-12), and DD is the current day of the month (01-31).
     222        /*
     223         * Added from comment by MartinSayles,
    224224        */
    225225        $yy = mysql2date("Y", $date);
     
    236236
    237237        $dd =   $day_of_year / 365.2422 * 1000;
    238         $ff = ($dd - (int)$dd) * 100;
     238        $ff = ($dd - (int)$dd) * 100; // TODO: Fix this later
    239239        $stardate = sprintf("%s%03s.%01s", $yy, (int)$dd, (int)$ff);
    240240    } else {
Note: See TracChangeset for help on using the changeset viewer.