<html> <head> <script type="text/javascript"> Date.prototype.getActualDay = getActualDay; function getActualDay() { var n = this.getDay(); n += 1; return n; } </script> </head> <body> <script type="text/javascript"> var today = new Date(); alert(today.getActualDay()); </script> </body> </html>