Title: German date
Last modified: April 12, 2017

---

# German date

 *  [wp3fan](https://wordpress.org/support/users/wp3fan/)
 * (@wp3fan)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/german-date-2/)
 * Please consider adding the german date time format: ‘dd.mm.yyyy’, for instance‘
   12.04.2017’, at hb-functions.php, lines 630-671. It is used in Germany, Austria
   and Switzerland.

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

 *  Plugin Contributor [Thoa Kim](https://wordpress.org/support/users/thoakim/)
 * (@thoakim)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/german-date-2/#post-9030060)
 * Hi
 * Change date format in Dashboard >> Settings >> General >> Date Format.
 * Bests,
 *  Thread Starter [wp3fan](https://wordpress.org/support/users/wp3fan/)
 * (@wp3fan)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/german-date-2/#post-9034114)
 * Hi,
 * Changing the Date Format in the WP Settings doesn’t help.
 * When I enter “d.m.Y” as Date Format, your plugin displays the american Date Format
   instead.
 * When I add these lines in your switch statement in the hb_date_time_format_js()
   function, it works:
 *     ```
       case 'd.m.Y':
       $return = 'dd.mm.yy';
       break;
       ```
   
 * Cheers,
    wp3fan
 *  Thread Starter [wp3fan](https://wordpress.org/support/users/wp3fan/)
 * (@wp3fan)
 * [9 years ago](https://wordpress.org/support/topic/german-date-2/#post-9054616)
 * So, are you going to fix it? It would be great if you did.
 * I looked into the code and the problem is, that you validate the Date Format 
   that is set in the WP Settings:
 *     ```
       // date time format
       function hb_date_time_format_js() {
       	// set detault datetime format datepicker
       	$dateFormat = hb_get_date_format();
   
       	switch ( $dateFormat ) {
       		case 'Y-m-d':
       			$return = 'yy-mm-dd';
       			break;
   
       		//
       		case 'Y/m/d':
       			$return = 'yy/mm/dd';
       			break;
   
       		case 'd/m/Y':
       			$return = 'dd/mm/yy';
       			break;
   
       		//
       		case 'd-m-Y':
       			$return = 'dd-mm-yy';
       			break;
   
       		case 'm/d/Y':
       			$return = 'mm/dd/yy';
       			break;
   
       		//
       		case 'm-d-Y':
       			$return = 'mm-dd-yy';
       			break;
   
       		case 'F j, Y':
       			$return = 'MM dd, yy';
       			break;
   
       		default:
       			$return = 'mm/dd/yy';
       			break;
       	}
       	return $return;
       }
       ```
   
 * As there is no “case ‘d.m.Y'”, the “default” switch statement is executed and
   the default american date (mm/dd/yy) returned.
 * So basically, you’d have to add a “case ‘d.m.Y'”-statement, like the statement
   I’ve written in my second post.
 * If you need any help, I’d be glad to help you out.
 *  Thread Starter [wp3fan](https://wordpress.org/support/users/wp3fan/)
 * (@wp3fan)
 * [9 years ago](https://wordpress.org/support/topic/german-date-2/#post-9104651)
 * Hello? Anyone out there?
 *  Plugin Contributor [Lee](https://wordpress.org/support/users/leehld/)
 * (@leehld)
 * [9 years ago](https://wordpress.org/support/topic/german-date-2/#post-9119654)
 * Dear [@wp3fan](https://wordpress.org/support/users/wp3fan/),
 * So, what you want is add case ‘d.m.Y’ in hb_date_time_format_js() function of
   WP Hotel Booking plugin?
 * Lee
    -  This reply was modified 9 years ago by [Lee](https://wordpress.org/support/users/leehld/).
 *  Plugin Contributor [Lee](https://wordpress.org/support/users/leehld/)
 * (@leehld)
 * [9 years ago](https://wordpress.org/support/topic/german-date-2/#post-9119668)
 * Ok [@wp3fan](https://wordpress.org/support/users/wp3fan/),
 * Please delete WP Hotel Booking plugin in your site and reinstall it. I update
   date time format js in the plugin to meet your request.
 * Please check it again.
 * Best Regards,
 * Lee
    -  This reply was modified 9 years ago by [Lee](https://wordpress.org/support/users/leehld/).

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

The topic ‘German date’ is closed to new replies.

 * ![](https://ps.w.org/wp-hotel-booking/assets/icon-256x256.png?rev=2442679)
 * [WP Hotel Booking](https://wordpress.org/plugins/wp-hotel-booking/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-hotel-booking/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-hotel-booking/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-hotel-booking/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-hotel-booking/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-hotel-booking/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Lee](https://wordpress.org/support/users/leehld/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/german-date-2/#post-9119668)
 * Status: not resolved