Title: Date released &amp; decimal mark output
Last modified: August 30, 2016

---

# Date released & decimal mark output

 *  Resolved [selse](https://wordpress.org/support/users/wwwp/)
 * (@wwwp)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/)
 * Hello again 🙂
 * Want to ask whether possible to get the detail about the movie release, like 
   dd-mm-yyyy (17 December 2015)? Currently the plugin return the year only.
 * Popular movies get rated from big number of users, how to get digit in groups(
   17450 >> 17,450) when using imdbvotes?
 * Thanks in advance.
 * [https://wordpress.org/plugins/imdb-connector/](https://wordpress.org/plugins/imdb-connector/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [thaikolja](https://wordpress.org/support/users/thaikolja/)
 * (@thaikolja)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874129)
 * Hi and thanks for your message.
 * There’re two different arguments; “year” and “released”. The latter gives you
   something like “31 Oct 2013” (if available).
 * Using thousands separators can be done by using the [PHP function number_format()](https://secure.php.net/manual/en/function.number-format.php).
 *  Thread Starter [selse](https://wordpress.org/support/users/wwwp/)
 * (@wwwp)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874233)
 * I’m using both “year” and “released”, both of them return the same value (year
   only). I guess (maybe) this because the data provided by omdbapi.
 * As the thousands separator, how to implement the function to the plugin? Really
   sorry about this, not PHP savvy here just an ordinary shortcode user 😀
 *  Plugin Author [thaikolja](https://wordpress.org/support/users/thaikolja/)
 * (@thaikolja)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874257)
 * What movie are you using?
 * PHP’s number_format() function works like this in PHP:
 *     ```
       <?php
          $movie_title = "Avatar";
          $votes       = imdb_connector_get_movie_detail($movie_title, "imdbvotes");
          $votes       = number_format($votes, 0);
          echo "The movie $movie_title has $votes votes.";
       ```
   
 *  Plugin Author [thaikolja](https://wordpress.org/support/users/thaikolja/)
 * (@thaikolja)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874260)
 * I’m just realizing you’re right. For some reason, with caching enabled, it only
   displays the year. I’ll fix it and let you know here.
 *  Thread Starter [selse](https://wordpress.org/support/users/wwwp/)
 * (@wwwp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874337)
 * Thanks for the updated plugin for the fix.
 * As for thousands separator, since I don’t know how to add the function to my 
   theme functions so it can work with existing shortcodes ( actually I don’t know
   any PHP at all 😀 ), I had to hardcoded this line **$value = number_format($value,
   0);** to plugin’s functions file.
 * So it goes from this
 *     ```
       /** Remove everything but numbers from imdbvotes */
       if($movie_detail === "imdbvotes") {
           $value = preg_replace("'[^0-9]'", "", $value);
           }
       ```
   
 * to this
 *     ```
       /** Remove everything but numbers from imdbvotes */
       if($movie_detail === "imdbvotes") {
           $value = preg_replace("'[^0-9]'", "", $value);
           $value = number_format($value, 0);
           }
       ```
   
 * Works great as I needed, the only con is if plugin update available. I have to
   add that single line again manually to the function. No problem here as long 
   as the function work properly and no conflict/error appear.
 *  Plugin Author [thaikolja](https://wordpress.org/support/users/thaikolja/)
 * (@thaikolja)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874338)
 * No need for that. I’ve implemented a filter that allows you to overwrite the 
   output. Please [download this version](https://drive.google.com/file/d/0B581Nph7ZvaQU19fcDRvT2hSb2M/view?usp=sharing)
   of the plugin and replace it with the old one (it will be included in the next
   version as well, so updates won’t destroy anything).
 * Then, open your functions.php in your theme directory and add the following:
 *     ```
       /**
           * @param $movie_details
           *
           * @return mixed
           */
          function imdb_connector_number_format_votes($movie_details) {
             $movie_details["imdbvotes"] = number_format($movie_details["imdbvotes"], 0);
   
             return $movie_details;
          }
   
          add_filter("imdb_connector_movie_details", "imdb_connector_number_format_votes");
       ```
   
 * That’s it already.
 *  Thread Starter [selse](https://wordpress.org/support/users/wwwp/)
 * (@wwwp)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874339)
 * Big thanks for that man, the last one works perfectly great. You solved all of
   my problem. Cheers 🙂
 *  Plugin Author [thaikolja](https://wordpress.org/support/users/thaikolja/)
 * (@thaikolja)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874340)
 * You’re welcome, glad I could help 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Date released & decimal mark output’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/imdb-connector_bac675.svg)
 * [IMDb Connector](https://wordpress.org/plugins/imdb-connector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/imdb-connector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/imdb-connector/)
 * [Active Topics](https://wordpress.org/support/plugin/imdb-connector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/imdb-connector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/imdb-connector/reviews/)

## Tags

 * [imdb](https://wordpress.org/support/topic-tag/imdb/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 8 replies
 * 2 participants
 * Last reply from: [thaikolja](https://wordpress.org/support/users/thaikolja/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/date-released-decimal-mark-output/#post-6874340)
 * Status: resolved