diff --git a/lib/puppet/provider/user/useradd.rb b/lib/puppet/provider/user/useradd.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/provider/user/useradd.rb
+++ b/lib/puppet/provider/user/useradd.rb
@@ -1,4 +1,5 @@
 require 'puppet/provider/nameservice/objectadd'
+require 'date'
 
 Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameService::ObjectAdd do
   desc "User management via `useradd` and its ilk.  Note that you will need to
@@ -31,7 +32,7 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ
         :absent
       else
         # Expiry is days after 1970-01-01
-        Date.new(1970).next_day(value).strftime('%Y-%m-%d')
+        (Date.new(1970,1,1) + value).strftime('%Y-%m-%d')
       end
     }
Fix user expiry failures on ruby <I>

Date.next_day is private on ruby <I> while it is public on ruby <I>

Convert the expiry to a date in a different way that works both on ruby
<I> and ruby <I>