Example #1
0
        /// <summary>
        /// Returns the time of the purchase of the app
        /// </summary>
        public static DateTime PurchaseTime(AppId appid = default)
        {
            if (appid == 0)
            {
                appid = SteamClient.AppId;
            }

            return(Epoch.ToDateTime(Internal.GetEarliestPurchaseUnixTime(appid.Value)));
        }
Example #2
0
        /// <summary>
        /// Gets a the time this achievement was unlocked.
        /// </summary>
        /// <param name="statName">The name of the achievement you want to get</param>
        /// <returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return DateTime.MinValue</returns>
        public DateTime GetAchievementUnlockTime(string statName)
        {
            bool val  = false;
            uint time = 0;

            if (!SteamUserStats.Internal.GetUserAchievementAndUnlockTime(Id, statName, ref val, ref time) || !val)
            {
                return(DateTime.MinValue);
            }

            return(Epoch.ToDateTime(time));
        }
 /// <summary>
 /// Gets the specified file's last modified date/time.
 /// </summary>
 public static DateTime FileTime(string filename) => Epoch.ToDateTime(Internal.GetFileTimestamp(filename));