Skip to content

0.7.8

Choose a tag to compare

@github-actions github-actions released this 06 Oct 03:05
· 381 commits to main since this release
02d812f

Added

  • Added a new datetime built-in library for handling date & time values, parsing, formatting, and more. (#94)

    Example usage:

    local DateTime = require("@lune/datetime")
    
    -- Creates a DateTime for the current exact moment in time
    local now = DateTime.now()
    
    -- Formats the current moment in time as an ISO 8601 string
    print(now:toIsoDate())
    
    -- Formats the current moment in time, using the local
    -- time, the French locale, and the specified time string
    print(now:formatLocalTime("%A, %d %B %Y", "fr"))
    
    -- Returns a specific moment in time as a DateTime instance
    local someDayInTheFuture = DateTime.fromLocalTime({
        year = 3033,
        month = 8,
        day = 26,
        hour = 16,
        minute = 56,
        second = 28,
        millisecond = 892,
    })
    
    -- Extracts the current local date & time as separate values (same values as above table)
    print(now:toLocalTime())
    
    -- Returns a DateTime instance from a given float, where the whole
    -- denotes the seconds and the fraction denotes the milliseconds
    -- Note that the fraction for millis here is completely optional
    DateTime.fromUnixTimestamp(871978212313.321)
    
    -- Extracts the current universal (UTC) date & time as separate values
    print(now:toUniversalTime())
  • Added support for passing stdin in process.spawn (#106)

  • Added support for setting a custom environment in load options for luau.load, not subject to getfenv / setfenv deoptimizations

  • Added Terrain:GetMaterialColor and Terrain:SetMaterialColor (#93)

  • Added support for a variable number of arguments for CFrame methods (#85)

Changed

  • Update to Luau version 0.596.
  • Update to rbx-dom database version 0.596.
  • process.spawn now uses powershell instead of /bin/bash as the shell on Windows, with shell = true.
  • CFrame and Vector3 values are now rounded to the nearest 2 ^ 16 decimal place to reduce floating point errors and diff noise. Note that this does not affect intermediate calculations done in lua, and only happens when a property value is set on an Instance.

Fixed

  • Fixed the process built-in library not loading correctly when using Lune in REPL mode.
  • Fixed list subcommand not listing global scripts without a local .lune / lune directory present.
  • Fixed net.serve stopping when the returned ServeHandle is garbage collected.
  • Fixed missing trailing newline when using the warn global.
  • Fixed constructor for CFrame in the roblox built-in library not parsing the 12-arg overload correctly. (#102)
  • Fixed various functions for CFrame in the roblox built-in library being incorrect, specifically row-column ordering and some flipped signs. (#103)
  • Fixed cross-service Instance references disappearing when using the roblox built-in library (#117)